Edgewall Software

Changes between Version 24 and Version 25 of TracWorkflow


Ignore:
Timestamp:
Oct 1, 2008, 11:26:26 AM (16 years ago)
Author:
meitarm@…
Comment:

Add super-generic "reviewing" workflow example with explanation and full configuration.

Legend:

Unmodified
Added
Removed
Modified
  • TracWorkflow

    v24 v25  
    110110}}}
    111111
     112== Example: Add simple optional generic review state ==
     113
     114Sometimes Trac is used in situations where "testing" can mean different things to different people so you may want to create an optional workflow state that is between the default workflow's `assigned` and `closed` states, but does not impose implementation-specific details. The only new state you need to add for this is a `reviewing` state. A ticket may then be "submitted for review" from any state that it can be reassigned. If a review passes, you can re-use the `resolve` action to close the ticket, and if it fails you can re-use the `reassign` action to push it back into the normal workflow.
     115
     116The new `reviewing` state along with its associated `review` action looks like this:
     117
     118{{{
     119review = new,assigned,reopened -> reviewing
     120review.operations = set_owner
     121review.permissions = TICKET_MODIFY
     122}}}
     123
     124Then, to integrate this with the default Trac 0.11 workflow, you also need to add the `reviewing` state to the `accept` and `resolve` actions, like so:
     125
     126{{{
     127accept = new,reviewing -> assigned
     128[…]
     129resolve = new,assigned,reopened,reviewing -> closed
     130}}}
     131
     132Optionally, you can also add a new action that allows you to change the ticket's owner without moving the ticket out of the `reviewing` state. This enables you to reassign review work without pushing the ticket back to the `new` status.
     133
     134{{{
     135reassign_reviewing = reviewing -> *
     136reassign_reviewing.name = reassign review
     137reassign_reviewing.operations = set_owner
     138reassign_reviewing.permissions = TICKET_MODIFY
     139}}}
     140
     141The full `[ticket-workflow]` configuration will thus look like this:
     142
     143{{{
     144[ticket-workflow]
     145accept = new,reviewing -> assigned
     146accept.operations = set_owner_to_self
     147accept.permissions = TICKET_MODIFY
     148leave = * -> *
     149leave.default = 1
     150leave.operations = leave_status
     151reassign = new,assigned,reopened -> new
     152reassign.operations = set_owner
     153reassign.permissions = TICKET_MODIFY
     154reopen = closed -> reopened
     155reopen.operations = del_resolution
     156reopen.permissions = TICKET_CREATE
     157resolve = new,assigned,reopened,reviewing -> closed
     158resolve.operations = set_resolution
     159resolve.permissions = TICKET_MODIFY
     160review = new,assigned,reopened -> reviewing
     161review.operations = set_owner
     162review.permissions = TICKET_MODIFY
     163reassign_reviewing = reviewing -> *
     164reassign_reviewing.operations = set_owner
     165reassign_reviewing.name = reassign review
     166reassign_reviewing.permissions = TICKET_MODIFY
     167}}}
     168
    112169== Example: Limit the resolution options for a new ticket ==
    113170