Edgewall Software

Version 2 (modified by Christian Boos, 12 years ago) ( diff )

cross-link to TracRoadmapCustomGroups

Workflow Configuration (since 0.11)

TracWorkflow describes how to create your own work flow for tickets.

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

Multiple end states and milestone progress

Trac has a more or less hard-coded closed end state. And it is the only one.

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 learns you 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.

This is how to proceed. Add the following section to trac.ini:

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.

There is nothing much special in here (check out the description of [milestone-groups] in TracIni), except that for some reason the possibility of introducing a comma-separated list of states does not seem obvious. Plus the missing of a documented relationship between the two sections, I guess.

PS: Note the heavy overloading of the word closed above; 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

Note: See TracWiki for help on using the wiki.