[[PageOutline(2-5,Contents,pullout)]] = Workflow based on ticket type == Description This plugin controls what actions can be performed on a ticket. The actions are specified in the `[ticket-workflow]` section of the TracIni file. With MultipleWorkflowPlugin Trac can read the workflow based on the type of ticket. If a section for that ticket type doesn't exist, then it uses the default workflow, see [#Example Example] below. The plugin works with Trac 0.11, 0.12 and 1.0. See also TypedTicketWorkflowPlugin, TracWorkflowAdminPlugin. === Workflow editing For changing the workflows an admin page is available in the ''Ticket System'' section. [[Image(workflow_editor.png, border=2,100%)]] === What's the difference to TypedTicketWorkflowPlugin? With MultipleWorkflowPlugin you may have an exclusive workflow section for each ticket type like this: {{{#!ini [ticket-workflow] # Default workflow approve = new, reopened -> approved approve.operations = del_resolution ... [ticket-workflow-Foo] # Workflow for ticket type 'Foo' do_foo = new -> foo ... [ticket-workflow-Bar] # Workflow for ticket type 'Bar' do_bar = new -> bar ... }}} With TypedTicketWorkflowPlugin you specify restrictions for ticket types in the default workflow by adding them to the transitions: {{{#!ini [ticket-workflow] approve = new, reopened -> approved approve.operations = del_resolution # approve is only valid for ticket types 'defect' and 'feature' approve.tickettype = defect, feature ... }}} The former is easier to manage if you have several ticket types with vastly different workflows. See also #5287. == Bugs/Feature Requests Existing bugs and feature requests for MultipleWorkflowPlugin are [report:9?COMPONENT=MultipleWorkflowPlugin here]. If you have any issues, create a [/newticket?component=MultipleWorkflowPlugin new ticket]. [[TicketQuery(component=MultipleWorkflowPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:multipleworkflowplugin here]. == Source You can check out MultipleWorkflowPlugin from [/svn/multipleworkflowplugin here] using Subversion, or [source:multipleworkflowplugin browse the source] with Trac. The [source:multipleworkflowplugin/trunk trunk] is compatible with Trac 1.2.x. The [source:multipleworkflowplugin/branches/multipleworkflow-1.3 1.3 branch] is compatible with Trac 1.0.x. == Installation '''Note''': This plugin doesn't require Python package `genshi` when using Trac 1.4+. General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. Enable the plugin by adding the following to your `trac.ini` file: {{{#!ini [components] multipleworkflow.* = enabled }}} Add the controller to the workflow controller list: {{{#!ini [ticket] workflow = MultipleWorkflowPlugin }}} == Configuration To use it you should have the {{{[ticket-workflow]}}} section defined in your `trac.ini` file. When a custom section for a ticket type has not been defined, that one will be used. The following is an example of a custom ticket workflow and not necessarily a standard setup. To define a different workflow for a ticket with type {{{Requirement}}} create a section in `trac.ini` called {{{[ticket-workflow-Requirement]}}} and add your workflow items: {{{#!ini [ticket-workflow-Requirement] leave = * -> * leave.default = 1 leave.operations = leave_status approve = new, reopened -> approved approve.operations = del_resolution approve.permissions = TICKET_MODIFY reopen_verified = closed -> reopened reopen_verified.name = Reopen reopen_verified.operations = set_resolution reopen_verified.set_resolution = from verified reopen_verified.permissions = TICKET_MODIFY reopen_approved = approved -> reopened reopen_approved.name = Reopen reopen_approved.operations = set_resolution reopen_approved.set_resolution = from approved reopen_approved.permissions = TICKET_CREATE remove = new, reopened, approved, closed -> removed remove.name = Remove this Requirement permanently remove.operations = set_resolution remove.set_resolution = removed remove.permissions = TICKET_MODIFY verify = approved -> closed verify.name = Verify the Requirement and mark verify.operations = set_resolution verify.set_resolution = verified verify.permissions = TICKET_MODIFY }}} This results in the following workflow: {{{ #!Workflow width=900 height=400 leave = * -> * leave.default = 1 leave.operations = leave_status approve = new, reopened -> approved approve.operations = del_resolution approve.permissions = TICKET_MODIFY reopen_verified = closed -> reopened reopen_verified.name = Reopen reopen_verified.operations = set_resolution reopen_verified.set_resolution = from verified reopen_verified.permissions = TICKET_MODIFY reopen_approved = approved -> reopened reopen_approved.name = Reopen reopen_approved.operations = set_resolution reopen_approved.set_resolution = from approved reopen_approved.permissions = TICKET_CREATE remove = new, reopened, approved, closed -> removed remove.name = Remove this Requirement permanently remove.operations = set_resolution remove.set_resolution = removed remove.permissions = TICKET_MODIFY verify = approved -> closed verify.name = Verify the Requirement and mark verify.operations = set_resolution verify.set_resolution = verified verify.permissions = TICKET_MODIFY }}} == Custom Workflow Statuses on Query Page Starting with [14565] all defined statuses from typed workflows are available on the ticket query page for filtering. == Recent Changes [[ChangeLog(multipleworkflowplugin, 3)]] == Author/Contributors '''Author:''' [wiki:ermal] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''