Opened 9 years ago

Closed 9 years ago

Feature request: show depgraph for all tickets in a query

Reported by: Owned by: Dave Felix Tiede normal TracTicketDepgraphPlugin normal 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.

comment:1 Changed 9 years ago by Dave

Type: defect → enhancement

Changed 9 years ago by Felix Tiede

Patch to create a depgraph from a ticket query

comment:2 Changed 9 years ago by Felix Tiede

Status: new → 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 9 years ago by Felix Tiede

Updated patch to work with [4766]

comment:3 Changed 9 years ago by Felix Tiede

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:  5 Changed 9 years ago by Dave

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 9 years ago by Felix Tiede

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 9 years ago by Felix Tiede

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

comment:6 Changed 9 years ago by Felix Tiede

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 9 years ago by Felix Tiede

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 9 years ago by Dave

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 9 years ago by Felix Tiede

Resolution: → fixed assigned → 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.

Modify Ticket

Change Properties