Add support for ticket dependencies to Trac

This plugin needs a major rewrite. Some severe defects have been reported in which the user's database was left in a bad state. Use at your own risk, and always make a database backup before installing!


What is it?

This plugin adds "blocks" and "blocked by" fields to each ticket, enabling you to express dependencies between tickets. It also provides a graphviz-based dependency-graph feature for those tickets having dependencies specified, allowing you to visually understand the dependency tree. The dependency graph is viewable by clicking 'depgraph' in the context (in the upper right corner) menu when viewing a ticket that blocks or is blocked by another ticket.

This plugin works on Trac 0.11 (no longer maintained), Trac 0.12 and Trac 1.0.

Shows "Depgraph" link on ticket (#62). This ticket has dependencies shown grafically.

Shown on screen shot:

  1. "Depgraph" link at ticket #62 (on middle top, yellow bullet).
  2. Blocks and blocked by extra fields at ticket #62.
  3. graphical representation and deeper relation to other tickets (on right).
  4. ticket statuses explanation (lower left corner).

What is it not?

  • It does not provide ticket-hiding for sub-tasks of a top-level ticket.
    • There is no parent/child relationship possible (though this is now on the roadmap for an upcoming release, see #10964).
    • You cannot view the descriptions of tickets depending on the current ticket.
    • In fact, there are no explicit features that can assist you with sub-task management.
  • It does not allow you to create a dependent ticket from the current ticket
  • It does not include reporting features to show how tasks are interrelated (other than the dependency graph already described above).

Just put the ticket numbers that a given ticket is blocking in the Blocking field. Enter just the number, no leading #. Separate multiple numbers with commas.

Make sure you add the custom fields as shown below.

You need to install graphviz to use the dependency graphs. You do not need the GraphvizPlugin or anything else beyond the dot binary.

Bugs/Feature Requests

Existing bugs and feature requests for MasterTicketsPlugin are here.

If you have any issues, create a new ticket.


107 / 130


16 / 39


5 / 5


Download the latest revision from here.

There is an unofficial Debian package. To rebuild this package from scratch you need the package source which extracts the revision b8715f528a from github.

There is also a version on PyPi.


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


The easiest way to install this plugin is by using easy_install:



To enable, add the following to your trac.ini file:

mastertickets.* = enabled

blocking = text
blocking.label = Blocking
blockedby = text
blockedby.label = Blocked By

Under the mastertickets section the following options are available:

  • dot_path: Path to the dot executable, default = 'dot'.
  • gs_path: Path to the ghostscript executable, default = 'gs'.
  • use_gs: If enabled, use Ghostscript to produce nicer output, default = False.

To configure the plugin to use a graphviz/dot installation that is at another location, add the following to your trac.ini file:

dot_path = /opt/local/bin/dot

Upgrade your installation

After installing or enabling this plugin, Trac will claim that it needs to be upgraded. This is because the plugin adds a new table to the database. So therefore run the following:

trac-admin /path/to/env upgrade

Known acceptable database versions

Sometimes Trac and/or plugins run into trouble with newer database versions, because they are fussier about error checking. Therefore this section lists versions that are known to work:

  • 3.0.4: PostgreSQL 8.4, Trac 1.0.1, Python 2.7

Recent Changes

15320 by rjollos on 2016-02-16 15:45:36
4.0.0dev: Skip post_process_request during exception handling

Fixes #12671.

15178 by rjollos on 2016-01-26 20:46:44
4.0.0dev: Raise TracError if dot binary path is invalid

Code snippet from SO:377028 is utilized.

Fixes #10452.

14695 by rjollos on 2015-06-18 21:16:05
4.0.0dev: Fix IndexError when adding blocking or blockedby relation.

The issue was seen when adding a relation to tickets created before, and not updated since, the [ticket-custom] entries for MasterTicketsPlugin were added. Tickets created before the MasterTicketsPlugin was installed won't have entries in the ticket_custom table for blocking and blockedby. Fixes #12303.



Author: coderanger
Maintainer: Ryan J Ollos
Contributors: mitar

Last modified 4 months ago Last modified on Feb 2, 2016, 11:37:34 PM