Edgewall Software

Changes between Version 8 and Version 9 of WorkFlow/Examples


Ignore:
Timestamp:
May 7, 2017, 9:47:55 PM (12 months ago)
Author:
Ryan J Ollos
Comment:

Read workflows from repository.

Legend:

Unmodified
Added
Removed
Modified
  • WorkFlow/Examples

    v8 v9  
    55As described in TracWorkflow with all its known quirks:
    66
    7 {{{#!Workflow
    8 [ticket-workflow]
    9 ; original-workflow.ini
    10 
    11 ; create the ticket:  -> New, owner set to component default or "somebody"
    12 
    13 ; New:
    14 ;   leave as new
    15 ;   accept ticket -> assigned state, owner set to self, shows up as accepted.
    16 ;   resolve as:   -> closed, resolution_set
    17 ;   reassign to:
    18 ;
    19 ; Assigned:
    20 ;   leave as assigned
    21 ;   resolve as:
    22 ;   reassign to: -> new state, not accepted
    23 ;
    24 ; Closed:
    25 ;   leave as closed
    26 ;   reopen ticket -> reopened, resolution_del
    27 ;
    28 ; Reopened:
    29 ;   leave as reopened
    30 ;   resolve as:
    31 ;   reassign to: -> new, owner_set
    32 
    33 ; This is action-centric
    34 leave = * -> *
    35 leave.operations = leave_status
    36 leave.default = 1
    37 
    38 accept = new -> assigned
    39 accept.permissions = TICKET_MODIFY
    40 accept.operations = set_owner_to_self
    41 
    42 resolve = new,assigned,reopened -> closed
    43 resolve.permissions = TICKET_MODIFY
    44 resolve.operations = set_resolution
    45 
    46 reassign = new,assigned,reopened -> new
    47 reassign.permissions = TICKET_MODIFY
    48 reassign.operations = set_owner
    49 
    50 reopen = closed -> reopened
    51 reopen.permissions = TICKET_CREATE
    52 reopen.operations = del_resolution
    53 }}}
     7[[Workflow(file=trunk/trac/ticket/workflows/original-workflow.ini)]]
    548
    559== Basic ([source:trunk/trac/ticket/workflows/basic-workflow.ini basic-workflow.ini]) ==
     
    5711This is an improved version of the original workflow:
    5812
    59 {{{#!Workflow
    60 [ticket-workflow]
    61 ; basic-workflow.ini
    62 ;
    63 ; This workflow is intended to be a "fixed" version of the original workflow.
    64 ;
    65 ; If you adopt it for an existing Trac environment, don't forget to convert
    66 ; the status of your existing tickets.
    67 ;
    68 ; Both the setup of the new [ticket-workflow] and the migration can be achieved
    69 ; by using the following script:
    70 ;
    71 ; contrib/workflow/migrate_original_to_basic.py
    72 
    73 leave = * -> *
    74 leave.operations = leave_status
    75 leave.default = 1
    76 
    77 create = <none> -> new
    78 create.default = 1
    79 
    80 create_and_assign = <none> -> assigned
    81 create_and_assign.label = assign
    82 create_and_assign.permissions = TICKET_MODIFY
    83 create_and_assign.operations = may_set_owner
    84 
    85 accept = new,assigned,accepted,reopened -> accepted
    86 accept.permissions = TICKET_MODIFY
    87 accept.operations = set_owner_to_self
    88 
    89 resolve = new,assigned,accepted,reopened -> closed
    90 resolve.permissions = TICKET_MODIFY
    91 resolve.operations = set_resolution
    92 
    93 reassign = new,assigned,accepted,reopened -> assigned
    94 reassign.permissions = TICKET_MODIFY
    95 reassign.operations = set_owner
    96 
    97 reopen = closed -> reopened
    98 reopen.permissions = TICKET_CREATE
    99 reopen.operations = del_resolution
    100 
    101 [milestone-groups]
    102 closed = closed
    103 closed.order = 0
    104 closed.query_args = group=resolution
    105 closed.overall_completion = true
    106 
    107 active = *
    108 active.order = 1
    109 active.css_class = open
    110 
    111 new = new,reopened
    112 new.order = 2
    113 }}}
     13[[Workflow(file=trunk/trac/ticket/workflows/basic-workflow.ini)]]
    11414
    11515What it means for a ticket to be "accepted" is left open for interpretation.
     
    11919Very simple workflow, suitable for single user Trac environments:
    12020
    121 {{{#!Workflow
    122 [ticket-workflow]
    123 ; simple-workflow.ini
    124 
    125 ; This is action-centric
    126 leave = * -> *
    127 leave.operations = leave_status
    128 leave.default = 1
    129 
    130 create = <none> -> new
    131 
    132 resolve_new = new -> closed
    133 resolve_new.label = resolve
    134 resolve_new.permissions = TICKET_MODIFY
    135 resolve_new.operations = set_owner_to_self,set_resolution
    136 
    137 accept = new,accepted -> accepted
    138 accept.permissions = TICKET_MODIFY
    139 accept.operations = set_owner_to_self
    140 
    141 resolve_accepted = accepted -> closed
    142 resolve_accepted.label = resolve
    143 resolve_accepted.permissions = TICKET_MODIFY
    144 resolve_accepted.operations = set_resolution
    145 
    146 unaccept = accepted -> new
    147 unaccept.permissions = TICKET_MODIFY
    148 unaccept.operations = del_owner
    149 
    150 reopen = closed -> new
    151 reopen.permissions = TICKET_CREATE
    152 reopen.operations = del_resolution
    153 }}}
     21[[Workflow(file=trunk/contrib/workflow/simple-workflow.ini)]]
    15422
    15523== Trivial ([source:trunk/contrib/workflow/trivial-workflow.ini trivial-workflow.in]) ==
     
    15725A very simple workflow, for illustration purposes only:
    15826
    159 {{{#!Workflow
    160 [ticket-workflow]
    161 ; trivial-workflow.ini
    162 
    163 create = <none> -> new
    164 
    165 resolve = new -> closed
    166 resolve.permissions = TICKET_MODIFY
    167 resolve.operations = set_resolution
    168 
    169 reopen = closed -> new
    170 reopen.permissions = TICKET_CREATE
    171 reopen.operations = del_resolution
    172 
    173 leave = * -> *
    174 leave.operations = leave_status
    175 leave.default = 1
    176 }}}
     27[[Workflow(file=trunk/contrib/workflow/trivial-workflow.ini)]]
    17728
    17829== !OpenSource ([source:trunk/contrib/workflow/opensource-workflow.ini opensource-workflow.ini]) ==
     
    18031Comprehensive workflow which is adapted to the way we work with tickets in the Trac project:
    18132
    182 {{{#!Workflow
    183 [ticket-workflow]
    184 ; opensource-workflow.ini
    185 
    186 ; create action
    187 create = <none> -> new
    188 
    189 ; accept action
    190 ; When you accept a ticket, you get ownership of it.  (You can't accept a
    191 ; ticket on someone else's behalf.)
    192 accept = new,assigned,accepted,started -> accepted
    193 accept.operations = set_owner_to_self
    194 accept.permissions = TICKET_MODIFY
    195 
    196 ; assign, reassign, unassign actions
    197 assign = new -> assigned
    198 assign.operations = set_owner
    199 assign.permissions = TICKET_MODIFY
    200 
    201 reassign = assigned,accepted,started -> assigned
    202 reassign.operations = set_owner
    203 reassign.permissions = TICKET_MODIFY
    204 
    205 ; Allow correcting the ownership of a closed ticket.
    206 change_owner = closed -> closed
    207 change_owner.label = change ownership
    208 change_owner.operations = set_owner
    209 change_owner.permissions = TICKET_MODIFY
    210 
    211 unassign = assigned,accepted,started -> new
    212 unassign.operations = del_owner
    213 unassign.permissions = TICKET_MODIFY
    214 
    215 ; leave actions
    216 leave = * -> *
    217 leave.operations = leave_status
    218 leave.default = 1
    219 
    220 ; resolve actions
    221 resolve = new,assigned,accepted,started -> closed
    222 resolve.operations = set_resolution
    223 resolve.permissions = TICKET_MODIFY
    224 
    225 ; start/stop actions
    226 start = accepted,assigned -> started
    227 start.operations = set_owner_to_self
    228 start.permissions = TICKET_MODIFY
    229 
    230 stop = started -> assigned
    231 stop.permissions = TICKET_MODIFY
    232 
    233 ; reopen actions
    234 reopen = closed -> new
    235 reopen.operations = del_resolution
    236 reopen.permissions = TICKET_CREATE
    237 
    238 ; request info actions
    239 ; For tickets with an owner, they go back to assigned
    240 request_info = assigned,accepted,started -> infoneeded
    241 request_info.permissions = TICKET_MODIFY
    242 
    243 provide_info = infoneeded -> assigned
    244 provide_info.permissions = TICKET_MODIFY
    245 provide_info.default = 2
    246 
    247 ; But tickets without an owner go back to new.
    248 request_info_new = new -> infoneeded_new
    249 request_info_new.label = request info
    250 request_info_new.permissions = TICKET_MODIFY
    251 
    252 provide_info_new = infoneeded_new -> new
    253 provide_info_new.label = provide info
    254 provide_info_new.permissions = TICKET_MODIFY
    255 provide_info_new.default = 2
    256 }}}
     33[[Workflow(file=trunk/contrib/workflow/opensource-workflow.ini)]]
    25734
    25835Probably suitable for other open source projects as well, where work must be coordinated between loosely coupled developers.
     
    26239Comprehensive workflow with a QA (Quality Assurance) stage:
    26340
    264 {{{#!Workflow
    265 [ticket-workflow]
    266 ; enterprise-workflow.ini
    267 
    268 ; create actions
    269 create = <none> -> new
    270 create.default = 1
    271 
    272 create_and_assign = <none> -> assigned
    273 create_and_assign.label = assign
    274 create_and_assign.operations = may_set_owner
    275 create_and_assign.permissions = TICKET_MODIFY
    276 
    277 ; assign, reassign, unassign actions
    278 assign = new -> assigned
    279 assign.operations = set_owner
    280 assign.permissions = TICKET_MODIFY
    281 
    282 reassign = assigned,in_work -> assigned
    283 reassign.operations = set_owner
    284 reassign.permissions = TICKET_MODIFY
    285 
    286 reassign_closed = closed -> closed
    287 reassign_closed.label = reassign
    288 reassign_closed.operations = set_owner
    289 reassign_closed.permissions = TICKET_MODIFY
    290 
    291 unassign = assigned,in_work -> new
    292 unassign.operations = del_owner
    293 unassign.permissions = TICKET_MODIFY
    294 
    295 ; leave actions
    296 leave = * -> *
    297 leave.operations = leave_status
    298 leave.default = 1
    299 
    300 ; test actions
    301 test = new,assigned,in_work -> in_QA
    302 test.permissions = TICKET_MODIFY
    303 
    304 ; resolve actions
    305 resolve = in_QA -> closed
    306 resolve.operations = set_resolution
    307 resolve.permissions = TICKET_MODIFY
    308 
    309 fail = in_QA -> assigned
    310 fail.permissions = TICKET_MODIFY
    311 
    312 ; start/stop actions
    313 start = assigned -> in_work
    314 start.operations = set_owner_to_self
    315 start.permissions = TICKET_MODIFY
    316 
    317 stop = in_work -> assigned
    318 stop.permissions = TICKET_MODIFY
    319 
    320 ; reopen actions
    321 reopen = closed -> new
    322 reopen.operations = del_resolution
    323 reopen.permissions = TICKET_CREATE
    324 
    325 ; request info actions
    326 ; For tickets with an owner, they go back to assigned
    327 request_info = assigned,in_work,in_QA -> infoneeded
    328 request_info.permissions = TICKET_MODIFY
    329 
    330 provide_info = infoneeded -> assigned
    331 provide_info.permissions = TICKET_MODIFY
    332 provide_info.default = 2
    333 
    334 ; But tickets without an owner go back to new.
    335 request_info_new = new -> infoneeded_new
    336 request_info_new.label = request info
    337 request_info_new.permissions = TICKET_MODIFY
    338 
    339 provide_info_new = infoneeded_new -> new
    340 provide_info_new.label = provide info
    341 provide_info_new.permissions = TICKET_MODIFY
    342 provide_info_new.default = 2
    343 }}}
     41[[Workflow(file=trunk/contrib/workflow/enterprise-workflow.ini)]]