I had originally had a question on the workflow branch's
ITicketActionController, but I think I figured it out. So now I have a
documentation note.

If one has an action with any associated data values (e.g. assign to
"x", or resolve "x"), and you render based on what's in the provided
ticket object, preview shows old values. This happens because
_insert_ticket_data calls render_ticket_action_control before it makes
any of the changes that get_ticket_changes returns.

I think I see why it works this way (actions aren't typically
idempotent, so applying them first may then produce a ticket where
that action is no longer available), but it certainly confused me
until I read the DefaultTicketActionController more closely. Then I
saw that it sniffs the new values out of req when rendering, thus
making preview work. This is subtle enough gotcha that I would have
appreciated the docstring mentioning it :-)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to