wiki:WorkFlowPatch

Version 13 (modified by trac, 9 years ago) (diff)

--

Patch for exporting an interface to alternative ticket workflows, and a plugin using it

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.ITicketWorkflow interface, which abstract the ticket action control logic into an extension point.
  • The trac.ticket.field module which is used to describe ticket fields 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.ticket.field.Field 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 tracnewworkflow 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]
tracnewworkflow.* = enabled

[ticket]
workflow = tracnewworkflow.tracnewworkflow.newworkflowplugin

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/A

Change Log

[359] by athomas on 2006-01-16 04:36:11

WorkFlowPatch:

  • Cleaned up clearsilver template output, so it looks purty
[358] by athomas on 2006-01-16 03:41:27

WorkFlowPatch:

  • Bugfixes
  • Using ticket.field objects in TicketSystem.get_ticket_fields()
[357] by athomas on 2006-01-15 16:31:06
WorkFlowPatch:

Modified workflow logic to be independent of TICKET_* permissions. It relies solely on the ROLE_* now.

[343] by athomas on 2006-01-14 05:19:07

WorkFlowPatch:

  • More PEP-8 fixes
  • Fix for Python 2.3 compatibility
  • Replaced controller with workflow to avoid confusion with MVC
  • Renaming tracworkflow -> newworkflow
  • More renaming
  • Still more rename
  • Added some (commented out) example code for using custom ticket fields and action form elements.
  • Moved trac.web.form to trac.web.ticket and cleaned it up a bit
[339] by athomas on 2006-01-13 14:40:19

WorkFlowPatch:

  • Made ticket.controller more consistent with components ini section

Author/Contributors

Author: athomas
Contributors:

TagIt(patch,athomas,alpha,0.10,plugin)?