Modify

Opened 6 years ago

Closed 6 years ago

#4048 closed enhancement (fixed)

Feature request: show depgraph for all tickets in a query

Reported by: daveappendix Owned by: ftiede
Priority: normal Component: TracTicketDepgraphPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

It would be nice if I could get a big dependency graph of all tickets matching an arbitrary query. I.e. I go to trac's 'view tickets' page, do a custom query to whittle it down to the results I'm interested in, and then click a 'depgraph' link to show me how they're related. Just an idea.

Attachments (3)

tracticketdepgraphplugin-query.patch (5.5 KB) - added by ftiede 6 years ago.
Patch to create a depgraph from a ticket query
tracticketdepgraphplugin-query.2.patch (5.5 KB) - added by ftiede 6 years ago.
Updated patch to work with [4766]
tracticketdepgraphplugin-query.3.patch (8.3 KB) - added by ftiede 6 years ago.
Updated patch to work with [4794], see patch comment - fixed bugs in graph generation from query and encoding ctxtnav links

Download all attachments as: .zip

Change History (12)

comment:1 Changed 6 years ago by daveappendix

  • Type changed from defect to enhancement

Changed 6 years ago by ftiede

Patch to create a depgraph from a ticket query

comment:2 Changed 6 years ago by ftiede

  • Status changed from new to assigned

Please try the attached patch.
It creates a dependency graph of infinite depth starting from the list of ticket ids selected by the query page from which it was called.

There is as yet no way to return to the query page but using the browser's "Back" button, but possibly there will be in the future when the list of tickets is generated by the plugin itself using trac's query language.

Changed 6 years ago by ftiede

Updated patch to work with [4766]

comment:3 Changed 6 years ago by ftiede

In the latest patch the feature has been included, as well as a stub also use report ids instead of a query.

New features are:

  • Direct link to graph from query page
  • Back link to query from dependency graph
  • Ability to specify queries in URL (just replace '/query' with '/depgraph' in URL)
  • Ability to specify queries in trac's mini query language as parameter in the macro call, along with the graph's depth.

Feedback welcome.

comment:4 follow-up: Changed 6 years ago by daveappendix

Thanks for doing all this so quickly. I won't get a chance to deploy and test it out until later in the week.

Cheers.

comment:5 in reply to: ↑ 4 Changed 6 years ago by ftiede

Replying to daveappendix:

Thanks for doing all this so quickly. I won't get a chance to deploy and test it out until later in the week.

np. Wanted to do it anyway, you just gave me a reason.

However, there's still minor work to do on the patch (which I'm currently doing), so be sure you always grab the latest version unless you want to do your testing twice ;-)

Changed 6 years ago by ftiede

Updated patch to work with [4794], see patch comment - fixed bugs in graph generation from query and encoding ctxtnav links

comment:6 Changed 6 years ago by ftiede

Latest version of the patch should be completed - unless I get the fealing I need to clean up the code further.

Full support of records just like queries now might be added to the repository after merging the patch itself. Possibly at the beginning of the next week. Until then I'd appreciate feedback.

comment:7 Changed 6 years ago by ftiede

One more thing:

Patching exported/checked out sources with the patch will report a failed hunk #1 for depgraph.py - that one can be ignored. It's just a cosmetic change to documentation comments and does not interfere with any function of the patch.

comment:8 Changed 6 years ago by daveappendix

Well, I had a quick go anyway, despite other priorities. Other than a few problems outlined below, it looks like exactly what I was after. Cheers!

Bugs:

  • The first time I show the depgraph for any query I get an error page that reads "Trac Error - No ticket specified". If I hit reload a few times in the browser, it will appear. It's as if the graphviz task has been backgrounded or something. Not sure if it's a setup problem on this machine or not.
  • There is an issue with spaces in a query. For example, the beta I'm working on is "2009.1 beta 3". We have this set as a milestone, and I did a query for all incomplete tickets from that milestone, and then generated a dependency graph. It comes up with an empty image, and the url reads ...milestone=2009.1%2Bbeta%2B3. If I change %2B to %20 by hand, it works.
  • I also just logged #4110, a more general problem with this plugin, not this patch.

A few extra ideas:

  • Possibly some way to filter out any non-blocked non-blocking tickets (orphans in the graph), since there's no way to specify that with a standard trac query.

comment:9 Changed 6 years ago by ftiede

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4993]) Added support for trac's query language along with a link from /query to the query's depgraph and back. This fixes #4048.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from ftiede. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.