Changes between Version 24 and Version 25 of AdvancedTicketWorkflowPlugin
- Timestamp:
- Aug 24, 2014, 1:11:54 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AdvancedTicketWorkflowPlugin
v24 v25 1 1 [[PageOutline(2-5,Contents,pullout)]] 2 = Advanced Ticket Workflow Plugin =2 = Advanced Ticket Workflow Plugin 3 3 4 == Description ==4 == Description 5 5 6 6 AdvancedTicketWorkflowPlugin provides a number of advanced operations for customizable … … 20 20 (File requests for additional operations as enhancement tickets.) 21 21 22 == Bugs/Feature Requests ==22 == Bugs/Feature Requests 23 23 24 24 Existing bugs and feature requests for AdvancedTicketWorkflowPlugin are [query:status!=closed&component=AdvancedTicketWorkflowPlugin&order=priority here]. … … 27 27 [/newticket?component=AdvancedTicketWorkflowPlugin&owner=retracile new ticket]. 28 28 29 == Download and Source ==29 == Download and Source 30 30 31 31 Download the [download:advancedticketworkflowplugin zipped source], check out [/svn/advancedticketworkflowplugin using Subversion], or [source:advancedticketworkflowplugin browse the source] with Trac. 32 32 33 == Installation ==33 == Installation 34 34 35 35 The plugin can be installed in the same way as other plugins. The simplest is generally to create an egg with 36 {{{ 36 {{{#!sh 37 37 $ python setup.py bdist_egg 38 38 }}} 39 39 and copy the `.egg` file from the `dist` directory to your Trac environment's `plugins` directory. 40 40 41 == Example ==41 == Example 42 42 Enable the plugin with: 43 {{{ 44 #!ini 43 {{{#!ini 45 44 [components] 46 45 advancedworkflow.* = enabled … … 49 48 50 49 Add the individual controller to the workflow controller list: 51 {{{ 52 #!ini 50 {{{#!ini 53 51 [ticket] 54 52 workflow = ConfigurableTicketWorkflow,TicketWorkflowOpOwnerReporter … … 57 55 58 56 And use the operation in your custom workflow: 59 {{{ 60 #!ini 57 {{{#!ini 61 58 [ticket-workflow] 62 59 needinfo = * -> needinfo … … 65 62 }}} 66 63 67 == Documentation ==64 == Documentation 68 65 69 66 * set_owner_to_reporter (!TicketWorkflowOpOwnerReporter) 70 67 Sets the owner to the ticket reporter. 71 {{{ 72 #!ini 68 {{{#!ini 73 69 <someaction>.operations = set_owner_to_reporter 74 70 }}} 75 71 * set_owner_to_component_owner (!TicketWorkflowOpOwnerComponent) 76 72 Sets the owner to the ticket's component owner. 77 {{{ 78 #!ini 73 {{{#!ini 79 74 <someaction>.operations = set_owner_to_component_owner 80 75 }}} 81 76 * set_owner_to_field (!TicketWorkflowOpOwnerField) 82 77 Sets the owner to the value of a ticket field. 83 {{{ 84 #!ini 78 {{{#!ini 85 79 <someaction>.operations = set_owner_to_field 86 80 <someaction>.set_owner_to_field = mycustomfield … … 88 82 * set_owner_to_previous (!TicketWorkflowOpOwnerPrevious) 89 83 Sets the owner to the previous owner. If there is no previous owner, the owner will be deleted. 90 {{{ 91 #!ini 84 {{{#!ini 92 85 <someaction>.operations = set_owner_to_previous 93 86 }}} 94 87 * set_status_to_previous (!TicketWorkflowOpStatusPrevious) 95 88 Sets the status to the previous status. If there is no previous status, this is a no-op. 96 {{{ 97 #!ini 89 {{{#!ini 98 90 <someaction>.operations = set_status_to_previous 99 91 }}} 100 92 * reset_milestone (!TicketWorkflowOpResetMilestone) 101 93 Will reset the milestone of a ticket if the milestone has been completed. This is useful for "reopen" actions. 102 {{{ 103 #!ini 94 {{{#!ini 104 95 <someaction>.operations = reset_milestone 105 96 }}} 106 97 * run_external (!TicketWorkflowOpRunExternal) 107 98 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.''' 108 {{{ 109 #!ini 99 {{{#!ini 110 100 <someaction>.operations = run_external 111 101 <someaction>.run_external = Hint to tell the user. … … 113 103 * triage (!TicketWorkflowOpTriage) 114 104 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. 115 {{{ 116 #!ini 105 {{{#!ini 117 106 <someaction> = somestatus -> * 118 107 <someaction>.operations = triage … … 122 111 123 112 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 `defect`s require a `qa` step, but `enhancement`s do not. 124 {{{ 125 #!ini 113 {{{#!ini 126 114 accept = new -> * 127 115 accept.name = Accept ticket into workflow … … 148 136 149 137 Note that the implementation of this operation is not robust. 150 {{{ 151 #!ini 138 {{{#!ini 152 139 ;displays as "close as duplicate [_________]" 153 140 dup = * -> closed … … 159 146 }}} 160 147 161 == Recent Changes ==148 == Recent Changes 162 149 163 150 [[ChangeLog(advancedticketworkflowplugin, 3)]] 164 151 165 == Author/Contributors ==152 == Author/Contributors 166 153 167 154 '''Author:''' [wiki:retracile] [[BR]]