wiki:WorkFlowPatch

Version 6 (modified by athomas, 9 years ago) (diff)

Documented installation and configuration

Patch for exporting an interface to alternative ticket workflows

Description

This is a patch against Trac trunk which implements an extension mechanism for allowing alternative ticket work flows. It is discussed at length on PEC under [trac-ticket:869 #869] and NewWorkFlow.

The patch adds two things to Trac's Python API:

  • The trac.ticket.api.ITicketActionController interface, which abstract the ticket action control logic into an extension point.
  • The trac.web.form module which is used to describe form controls that can be passed to Trac's form_control() Clearsilver function.

It also adds one function to Trac's Clearsilver macros:

  • form_control(control). This takes a trac.web.form.Control object and renders it as a form control.

Installation

Once you have downloaded or checked out the source, apply workflow.diff to Trac trunk and reinstall Trac.

Then change into the tracworkflow directory and type:

# python setup.py bdist_egg
# cp dist/*.egg /some/trac/env/plugins

Configuration

Add the following options to your trac.ini in the appropriate sections:

[components]
tracworkflow.tracworkflow.tracworkflowplugin = enabled

[ticket]
controller = TracWorkFlowPlugin

Restart your web server.

The plugin implements the following new Trac permissions, which are essentially roles:

PermissionRole
ROLE_DEVELOPERDeveloper
ROLE_QAQuality assurance
ROLE_RELEASERelease manager

Add your users into the appropriate roles using trac-admin and the new ticket workflow should be in place.

Full details on which roles can do what are documented on the NewWorkFlow page.

It is entirely possible that I have not captured all of the transitions correctly, and there are some known outstanding issues.

Bugs/Feature Requests

Existing bugs and feature requests for WorkFlowPatch are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from here.

Source

You can check out WorkFlowPatch from here using Subversion, or browse the source with Trac.

Example

N/Aa

Author/Contributors

Author: athomas
Contributors:

TagIt(patch,athomas,alpha,0.10)?