Ticket #263 (new fixme)

Opened 2 years ago

Last modified 2 years ago

Fix Trac depgraph display to link also to tickets *not* on the critical path

Reported by: ichthyo Owned by:
Priority: lesser Milestone: 0integration
Component: infrastructure Keywords: python trac
Cc: Blocked By:
Blocking:

Description

The depgraph of the meta/tracking tickets are quite instructive, but they could be better if all tickets displayed in this graph would be accessible by link. Currently, this display produces links only for the tickets on the critical path (i.e. the red ones)

Change History

comment:1 Changed 2 years ago by ichthyo

Investigated this issue a bit, writing my findings down here for later....

  • Subversion-URL:  http://trac-hacks.org/svn/masterticketsplugin
  • last change is from August 2008
  • lots of open tickets  here...
  • my understanding of the implementation:
    • graphviz.py provides a model of the depgraph, whith a Node and an Edge class. The Graph class provides a pretty-printing by iteration. This sets up the basic DOT syntax, but passes any attributes of the nodes as-is
    • web_ui.py contains the code actually generating the depgraph output. Look at the very bottom.
      • process_request(self,req) builds a graph for the ticket in question and then produces output either through graphviz or with the help of ghostscript
      • for building the graph, _build_graph(self, req, tkt_id) is invoked
      • and this one sets some default options, but then just walkes the dependency graph of this ticket in question, adding the necessary attributes (color, description, URL) to each ticket touchted by this immediate dependency graph
      • consequently, any other tickets also linked in, but not in the immediate dependency graph of the ticket in question for this request, remain untouched and thus show up just with the default properties (grey and without any description and link)

comment:2 Changed 2 years ago by ichthyo

There are two interesting patches submitted to the bug tracking system of Trac Hacks. If we are going to fix/improve the dependency graph, then we might take the opportunity of applying those two patches as well:

  • Add the ticket summary as mouse over to the links for related tickets..
    --- masterticketsplugin/0.10/mastertickets/util.py	2007-07-11 23:00:59.000000000 +1000
    +++ virgin_mt/masterticketsplugin/0.10/mastertickets/util.py	2007-02-22 17:29:20.000000000 +1100
    @@ -16,4 +16,4 @@
         return blocking_ids
         
     def linkify_ids(env, req, ids):
    -    return Markup(', '.join([unicode(html.A('#%s'%i, href=req.href.ticket(i), class_='%s ticket'%Ticket(env, i)['status'], title=Ticket(env, i)['summary'])) for i in ids]))
    +    return Markup(', '.join([unicode(html.A('#%s'%i, href=req.href.ticket(i), class_='%s ticket'%Ticket(env, i)['status'])) for i in ids]))
    
  • fix broken ticket summary in the mouseover in the dependency graph by quoting properly:
    --- 0.11/mastertickets/web_ui.py	2009-05-19 06:48:03.000000000 -0400
    +++ TracMasterTickets/mastertickets/web_ui.py	2009-05-19 06:35:55.000000000 -0400
    @@ -188,7 +188,7 @@
                 node['fillcolor'] = tkt['status'] == 'closed' and 'green' or 'red'
                 node['URL'] = req.href.ticket(tkt.id)
                 node['alt'] = u'Ticket #%s'%tkt.id
    -            node['tooltip'] = tkt['summary']
    +            node['tooltip'] = tkt['summary'].replace('"', '"')
    
                 for n in link.blocking:
                     node > g[n]
    
Note: See TracTickets for help on using tickets.