Sometimes we want to export data from Bugzilla.
There are multiple APIs for export (and other data manipulation). We use the XML-RPC interface for the Bugzilla-MediaWiki plugin:
It's also possible to get feeds and CSV exports from Bugzilla:
- Does Bugzilla allow data to be imported and exported?
What uses Bugzilla data?
- Wiki (will be switched to REST API)
- Gerrit ??
- Bots that feed into IRC channels and our Mailing Lists
Bugzilla has an accessible XML-RPC interface. If you're connecting to it with a tool like the Mediawiki-Bugzilla plugin, this information will prove useful:
REST URL: https://bugs.documentfoundation.org/xmlrpc.cgi Bugzilla URL: https://bugs.documentfoundation.org Tag Name: bugzilla Method: XML-RPC
(Note: this information may change -- please check with TDF sysadmins for further information)
Exporting data in CSV format is relatively straightforward if you know some tricks :-)
URLs for CSV export
Here's an example of a simple search URL with the following parameters:
- Product: LibreOffice
- Status: UNCONFIRMED
Here's the standard URL to search for all UNCONFIRMED bugs in the browser (limited to 500):
If we want to remove the limit, here's the change:
https://bugs.documentfoundation.org/buglist.cgi?bug_status=UNCONFIRMED&list_id=358726 &product=LibreOffice&query_format=advanced&limit=0&order=priority%2Cbug_severity ...note the difference, highlighted in bold.
Here are the changes necessary to get a CSV text file instead of an HTML page:
https://bugs.documentfoundation.org/buglist.cgi?bug_status=UNCONFIRMED&list_id=358726 &product=LibreOffice&query_format=advanced&limit=0&ctype=csv&human=1 note that we've lost the order term, and gained values for ctype and human.
Specifying particular columns
The set of columns that will be exported is set in your local config/cookie (AFAIK). The default set includes:
- Bug ID
- Summary (Full)
To export a different set of columns, you'll need to specify them in your URL, formatted using the internal variable names.
Here's the general format:
Here's an example including Bug ID, Product, Component, Assignee, Status, Summary, Operating System, Whiteboard, and Keywords:
And here's the full URL:
https://bugs.documentfoundation.org/buglist.cgi?bug_status=UNCONFIRMED&product=LibreOffice &query_format=advanced&limit=0&ctype=csv&human=1 &columnlist=bug_id,product,component,assigned_to,bug_status,short_desc,op_sys,status_whiteboard,keywords
Internal Variable Names
Here's a field list I grabbed elsewhere, so YMMV:
actual_time alias assigned_to blocked bug_file_loc bug_id bug_severity bug_status cc cclist_accessible classification classification_id component creation_ts deadline delta_ts dependson dup_id estimated_time everconfirmed exporter group keywords long_desc op_sys priority product qa_contact remaining_time rep_platform reporter reporter_accessible resolution short_desc status_whiteboard target_milestone urlbase version votes
Export in the future?
After migration to our own Bugzilla instance, we will have more flexibility in what methods of data export we make available. If there's a tool or a workflow that you'd like to consider implementing that needs additional help on the backend, please talk with us, and we'll do our best to help you out.