Edgewall Software

Workflow Configuration

TracWorkflow describes how to create your own workflow for tickets.

This page adds some tricks of the trade to the existing documentation.

Multiple end states and milestone progress

In Trac a ticket has a single end state, called Closed. This shows in the default roadmap view, where milestone progress is depicted in terms of Closed and Active tickets.

Now suppose you need to differentiate between problems that actually took effort before reaching Closed state, and problems that were rejected for some reason. TracWorkflow explains how to create these states and how to add the desired transitions.

But if you stop here, the roadmap view still considers the rejected tickets as Active. Your milestone will never make it.

To fix this, add the following section to trac.ini:

[milestone-groups]
closed = closed,rejected
closed.order = 0
closed.css_class = closed
closed.label = closed
closed.overall_completion = true
 
active = *
active.order = 1
active.css_class = open
active.label = active

The above implements the hard-coded behaviour, but adds tickets in rejected state to the Closed and completed part of the progress bar.

Within Trac the word closed has many meanings and occurrences: it denotes the name of a group, a ticket state, a CSS class (creating the green color in the leftmost (0) part of the progress bar) and a text label.

See also: TracRoadmapCustomGroups, milestone-groups in TracIni

Last modified 4 years ago Last modified on Feb 1, 2015, 11:46:36 PM
Note: See TracWiki for help on using the wiki.