On Jun 1, 3:49 pm, "Dan Winslow" <dwins...@aiminstitute.org> wrote:
> I want to be able to control validation of fields on certain actions.
> For instance, I want to block changing the status to Closed if a certain
> field has not been filled out.  So, two questions :
>
> 1. Is this possible within the current Trac 0.11, and if so, how.
>
> 2. Can it be done with custom fields?
>
> 3. Has anyone considered a general purpose mechanism to apply
> constraints to workflow, in the following manner :
>   a. Add the ability to specify a SQL query to an action, such that when
> the action is fired, the query is run.
>   b. If the query returns a single column of boolean false, the action
> is blocked with a validation error. If it returns anything else, it
> proceeds.
>
> This would allow a very easy way to specify a workflow section setting
> that could be customized for any condition. Example :
> resolve = in_QA -> closed
> resolve.operations = set_resolution
> resolve.permissions = TICKET_MODIFY
> resolve.validate = select 1=0 from tickets where somefield > 0;
>
> Obviously thats not a real example but you get the idea.
>
> Dan Winslow
> Director of Information Technology, AIM INSTITUTE
> 1905 Harney Street, Suite 700
> Omaha, NE 68102
> 402-345-5025 x156
> dwins...@aiminstitute.orgwww.aiminstitute.org

or you could try the TicketValidatorPlugin 
http://trac-hacks.org/wiki/TicketValidatorPlugin
This requires field X to not be left blank on transition Y  Take a
little layout though, but you have to allow for blank as the default
for these types of fields.  It works on custom fields.

The TicketSubmitPolicyPlugin is more flexible, but it's not quite
working right in 0.11 last time I tried it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to