I am starting to dig into how workflows are implemented with the goal
of implementing #7709 from Trac-Hacks[1]. The end result should be
that actions not defined by the workflow will be disallowed and any
operations the action defines should be applied. I am looking at the
ITicketActionController interface and its implementation in
ConfigurableTicketWorkflow. Is there a straightforward way to ask,
given a ticket and a status, if it is valid for the ticket to be
transitioned to that status? I haven't been able to find this type of
validation being done anywhere else (and didn't really expect to).

Right now I have a (buggy) hack that uses the internals of
ConfigurableTicketWorkflow, but that could easily break for other
implementations of ITicketActionController. It keeps track of which
tickets have an invalid transition. If any are invalid the entire
transaction is rolled back and an error is raised describing which
tickets are invalid.

[1]: http://trac-hacks.org/ticket/7709

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

Reply via email to