Add support for ticket dependencies to Trac
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.
Shown on screen shot:
- "Depgraph" link at ticket #62 (on middle top, yellow bullet);
- Blocks and blocked by extra fields at ticket #62;
- graphical representation and deeper relation to other tickets (on right);
- 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.
- Although it would be cool.
- 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.
If you have any issues, create a new ticket.
Download the latest revision from here.
To enable, add to trac.ini:
[components] mastertickets.* = enabled [ticket-custom] blocking = text blocking.label = Blocking blockedby = text blockedby.label = Blocked By
Under the mastertickets section the following options are available:
- dot_path (default='dot'): Path to the dot executable
- gs_path (default='gs'): Path to the ghostscript executable
- use_gs (default=False): If enabled, use ghostscript to produce nicer output
To configure the plugin to use a graphviz/dot installation that is at another location:
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 run:
trac-admin /path/to/env upgrade
Refs #10194: Implemented a fix for the IntegrityError when importing tickets with the TicketImportPlugin and not defining a changetime in the dataset (or in some cases of using the same changetime for multiple tickets).
The ticket id, time and field columns must be unique in the ticket_change table. Importing a set of tickets that are all assigned a changetime of "now" will result in an IntegrityError whenever two or more ticket share a relation with a single other ticket.
This feels like more of a workaround than a solution, but it will hopefully do for now.
Added unit test framework with no tests.
- Added setup.cfg file.
- Bumped version to 3.0.5dev.
Refs #7621: Log errors from calling GraphViz.