| 94 | == Example: Adding optional Testing with Workflow == |
| 95 | |
| 96 | By adding the following to your [ticket-workflow] section of trac.ini you get optional testing. When the ticket is in new, accepted or needs_work status you can choose to submit it for testing. When its in the testing status the user gets the option to reject it and send it back to needs_work, or pass the testing and send it along to closed. If they accept it then it gets automatically marked as closed and the resolution is set to fixed. Since all the old work flow remains a ticket can skip this entire section. |
| 97 | |
| 98 | {{{ |
| 99 | testing = new,accepted,needs_work -> testing |
| 100 | testing.name = Submit to reporter for testing |
| 101 | testing.permissions = TICKET_MODIFY |
| 102 | reject = testing -> needs_work |
| 103 | reject.name = Failed testing, return to developer |
| 104 | pass = testing -> closed |
| 105 | pass.name = Passes Testing |
| 106 | pass.operations = set_resolution |
| 107 | pass.set_resolution = fixed |
| 108 | }}} |
| 109 | |
| 110 | == Example: Limit the resolution options for a new ticket == |
| 111 | |
| 112 | The above resolve_new operation allows you to set the possible resolutions for a new ticket. By modifyin the existing resolve action and removing the new status from before the -> we then get two resolve actions. One with limited resolutions for new tickets, and then the regular one once a ticket is accepted. |
| 113 | |
| 114 | {{{ |
| 115 | resolve_new = new -> closed |
| 116 | resolve_new.name = resolve |
| 117 | resolve_new.operations = set_resolution |
| 118 | resolve_new.permissions = TICKET_MODIFY |
| 119 | resolve_new.set_resolution = invalid,wontfix,duplicate |
| 120 | resolve = assigned,accepted,reopened -> closed |
| 121 | resolve.operations = set_resolution |
| 122 | resolve.permissions = TICKET_MODIFY |
| 123 | }}} |
| 124 | |