State changes are populated AFTER triggering validate_ticket
|Reported by:||Owned by:||Eli Carter|
When processing a ticket request, trac 0.11b1 calls validate_ticket() BEFORE populating the state (and other fields) changes related to the workflow in place. Thus, plug-ins implementing ITicketManipulator no longer has access to the real state of the ticket, because some of the fields (state, owner, …) can be changed after the validation.
This is a regression and a change on behaviour from the 0.10.x branch, which should be fixed or CLEARLY be documented as an API change. All our custom ITicketManipulator plug-ins that perform some validation when the ticket is being closed are broken on 0.11b1, because the ticket state is still "new" when the plug-in are called.
I think either TicketModule._process_ticket_request() should call _validate_ticket() AFTER calling _apply_ticket_changes(), or ITicketManipulators should be able to interact with the workflow and get a list of field changes.