|Version 23 (modified by rjollos, 2 years ago) (diff)|
Advanced Ticket Workflow Plugin
AdvancedTicketWorkflowPlugin provides a number of advanced operations for customizable workflows that are similar to the operations provided in the customizeable workflow of the core system.
Currently provided operations are:
(File requests for additional operations as enhancement tickets.)
If you have any issues, create a new ticket.
Download and Source
Enable the plugin with:
[components] advancedworkflow.* = enabled
(or by copying the egg to the plugins directory)
Add the individual controller to the workflow controller list:
[ticket] workflow = ConfigurableTicketWorkflow,TicketWorkflowOpOwnerReporter
(The individual controller name is listed in parenthesis after the operation name in the documentation section below.)
And use the operation in your custom workflow:
[ticket-workflow] needinfo = * -> needinfo needinfo.name = Need info needinfo.operations = set_owner_to_reporter
- set_owner_to_reporter (TicketWorkflowOpOwnerReporter)
Sets the owner to the ticket reporter.<someaction>.operations = set_owner_to_reporter
- set_owner_to_component_owner (TicketWorkflowOpOwnerComponent)
Sets the owner to the ticket's component owner.<someaction>.operations = set_owner_to_component_owner
- set_owner_to_field (TicketWorkflowOpOwnerField)
Sets the owner to the value of a ticket field.<someaction>.operations = set_owner_to_field <someaction>.set_owner_to_field = mycustomfield
- set_owner_to_previous (TicketWorkflowOpOwnerPrevious)
Sets the owner to the previous owner. If there is no previous owner, the owner will be deleted.<someaction>.operations = set_owner_to_previous
- set_status_to_previous (TicketWorkflowOpStatusPrevious)
Sets the status to the previous status. If there is no previous status, this is a no-op.<someaction>.operations = set_status_to_previous
- reset_milestone (TicketWorkflowOpResetMilestone)
Will reset the milestone of a ticket if the milestone has been completed. This is useful for "reopen" actions.<someaction>.operations = reset_milestone
- run_external (TicketWorkflowOpRunExternal)
Runs an external script <tracenv>/hooks/<someaction> passing the ticket number and the username as parameters. Security warning: If you have account registration available, your hook script must treat the username as user input.<someaction>.operations = run_external <someaction>.run_external = Hint to tell the user.
- triage (TicketWorkflowOpTriage)
Sets the next status based on mapping the value of a field to a status value. For example, this can be used for a "triage" action that splits a workflow based on the ticket type.<someaction> = somestatus -> * <someaction>.operations = triage <someaction>.triage_field = type <someaction>.triage_split = defect->new_defect,task->new_task,enhancement->new_enhancement
The most common request is to use a different workflow based on the ticket type. Let's simplify that case slightly for the sake of this example and assume that there are only two ticket types, defect and enhancement. We'll say that defects require a qa step, but enhancements do not.accept = new -> * accept.name = Accept ticket into workflow accept.operations = triage accept.triage_field = type accept.triage_split = defect->new_defect,enhancement->new_enhancement resolve_enh = new_enhancement -> closed resolve_enh.name = resolve resolve_enh.operations = set_resolution submittotest = new_defect -> qa submittotest.name = Submit to Test resolve_def = qa -> closed resolve_def.name = resolve resolve_def.operations = set_resolution
- xref (TicketWorkflowOpXRef)
Adds a comment to the ticket specified in the text field. Enter either the bare ticket number or '#' + ticket number. The format of the comment to be added to the other ticket is given as a python string with a single %s in it. That format string defaults to 'Ticket %s is related to this ticket'.
Also adds a comment to the local ticket. The format of the comment for the local ticket can be specified with .xref_local; it defaults to 'Ticket %s was marked as related to this ticket'. This functionality can be disabled by setting .xref_local to an empty value.
Note that the implementation of this operation is not robust.;displays as "close as duplicate [_________]" dup = * -> closed dup.name = close dup.operations = set_resolution,xref dup.set_resolution = duplicate dup.xref = Ticket %s has been marked as a duplicate of this ticket. dup.xref_local = Closed as duplicate of %s.
-  by rjollos on 2014-12-15 00:07:00
1.2.0dev: Queries use Trac 1.0 database API.
-  by rjollos on 2014-11-11 14:03:34
1.2.0dev: PEP-0008 and Trac coding style changes.
-  by rjollos on 2014-11-11 13:30:49
Creating a new branch for a Trac 1.2-compatible version. The database API changes in Trac 1.1.2 necessitate creating a new version of the plugin that uses the Trac 1.0 and later database API.