Bug 452399 - need bugzilla xmlrpc dependency chain call
Summary: need bugzilla xmlrpc dependency chain call
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Bugzilla
Classification: Community
Component: Dependency Views
Version: devel
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: PnT DevOps Devs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-06-22 03:59 UTC by Matt Domsch
Modified: 2013-06-24 02:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-28 02:38:00 UTC
Embargoed:


Attachments (Terms of Use)
deptree.py - example code for generating a deplist from a given bug ID (1.79 KB, text/plain)
2008-08-28 15:06 UTC, Will Woods
no flags Details
merge-mock-list-to-bz-csv.py (7.85 KB, text/plain)
2008-08-28 15:41 UTC, Matt Domsch
no flags Details

Description Matt Domsch 2008-06-22 03:59:15 UTC
Description of problem:
python-bugzilla and bugzilla's xmlrpc interface lack a way to get the dependency
chain of a particular bug in a sane fashion.  Recursively calling getbugsimple()
and getbug() following down bug.dependson takes crazy long.  Querying using an
HTTP buglist.cgi request and screenscraping is 8-10x faster, but is ugly.

I would like to see an xmlrpc interface which python-bugzilla can make use of,
which provides a fast function to recursively get the bug dependency list,
optionally excluding bugs which are closed.

Comment 1 David Lawrence 2008-08-28 02:08:31 UTC
The showdependencytree.cgi script has a XML ctype that could be used for this. 

For example:

https://bugzilla.redhat.com/showdependencytree.cgi?id=406071&hide_resolved=0&ctype=xml

will display the full dependency tree in XML format. Simple change hide_resolved=0 to hide_resolved=1 if you want to hide the resolved bugs from the tree.

Would this be sufficient?

Dave

Comment 2 Matt Domsch 2008-08-28 02:38:00 UTC
yes, I can make that work, thanks.

Comment 3 Will Woods 2008-08-28 15:06:20 UTC
Created attachment 315226 [details]
deptree.py - example code for generating a deplist from a given bug ID

For the record, here's some example python code that uses expat to parse the XML output mentioned. I'm working on integrating it into python-bugzilla.

Comment 4 Matt Domsch 2008-08-28 15:41:20 UTC
Created attachment 315229 [details]
merge-mock-list-to-bz-csv.py

Unfortunately, the XML returned with the dependency list doesn't include a <component> field for each bug, which I need.  So I wind up doing it in two steps: 1) get the dependency list, then 2) get bug status for all the bugs on that list so I can get the component tag.

Attached is the hackjob I put together.  Sorry for the use of curl+subprocess, but it's necessary behind my stupid proxy servers...

Comment 5 David Lawrence 2008-08-28 15:53:30 UTC
(In reply to comment #4)
> Created an attachment (id=315229) [details]
> merge-mock-list-to-bz-csv.py
> 
> Unfortunately, the XML returned with the dependency list doesn't include a
> <component> field for each bug, which I need.  So I wind up doing it in two
> steps: 1) get the dependency list, then 2) get bug status for all the bugs on
> that list so I can get the component tag.
> 
> Attached is the hackjob I put together.  Sorry for the use of curl+subprocess,
> but it's necessary behind my stupid proxy servers...

File a Bugzilla RFE to add the component to the XML output (and may be useful for the cgi output as well) and I will put it in for the next update. We are sending an update out today but it is too late to get in today. We normally update each Thursday for non-critical fixes.

Dave

Comment 6 Matt Domsch 2008-08-28 16:05:00 UTC
RFE filed: https://bugzilla.redhat.com/show_bug.cgi?id=460559


Note You need to log in before you can comment on or make changes to this bug.