|Version 25 (modified by kirean, 6 years ago) (diff)|
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 well on Trac 0.11 and Trac 0.12.
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 is NOT a plugin for Trac 0.10, as explained below.
- It does not provide ticket-hiding for sub-tasks of a top-level ticket.
- There is no parent/child relationship possible
- 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).
NOTE: The 0.10 version of this plugin suffers from many systemic design flaws. The 0.11 version has been re-written from the ground up to avoid these, however I do not currently have the time to invest in a backport. Please do not file tickets against the 0.10 version, as I will close all of them as wontfix.
NOTE 2 The 0.11 version requires a version of Genshi >=0.5 and <0.6.
NOTE 3 People seem to be misunderstanding this, so I will repeat it. DO NOT USE THE 0.10 VERSION, IT IS BROKEN.
NOTE 4 Version >= 3.x of this plugin is maintained / has a repository at http://github.com/coderanger/trac-mastertickets. Requires Trac >= 0.12.
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.
This section addresses the plugin for Trac 0.11 and 0.12.
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
For the 0.12 version, see the github repository.
For the 0.11 version:
- 15320 by rjollos on 2016-02-16 15:45:36
4.0.0dev: Skip post_process_request during exception handling
- 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.
- 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.