Project

General

Profile

Actions

Feature #2448

open

Graphviz of ticket dependencies (with example)

Added by Matthew W almost 16 years ago. Updated about 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-01-06
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

I found the output of this (admittedly very hacky, but conceptually quite simple) script a lot more useful than the gannt chart.

Would it be possible to build a feature like this into redmine, generating a graphviz of dependencies between open tickets on any given project or version?


#!/bin/sh

(
echo "digraph redmine {";

mysql -N -s -uredmine --password= -Dredmine -e "select id,subject from issues where status_id != 5 and fixed_version_id = 1" | ruby -e 'puts STDIN.map {|x| x.split(/\t/)}.map {|id,title| "#{id} [label=\"#{id}: #{title.chomp.gsub(/((?:[^ ]+ ){4})/, "\\1\\n")}\"]"}';

mysql -N -s -uredmine --password= -Dredmine -e "select issue_from_id, issue_to_id from issue_relations ir join issues i1 on ir.issue_from_id = i1.id join issues i2 on ir.issue_to_id = i2.id where relation_type = 'precedes' and i1.status_id != 5 and i2.status_id != 5 and i1.fixed_version_id and i2.fixed_version_id = 1" | ruby -e 'puts STDIN.map {|x| x.split(/\t/)}.map {|id1,id2| "#{id1} -> #{id2}"}';

echo "}" 
) | dot -Tpng > /var/www/space/redmine_graph.png


Files

redmine_graph.png (68 KB) redmine_graph.png Jean-Baptiste Barth, 2009-04-06 13:46

Related issues

Related to Redmine - Feature #279: issue dependenciesClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #559: Workflow EnhancementsNew

Actions
Related to Redmine - Feature #12647: issue relations network viewNew

Actions
Actions

Also available in: Atom PDF