Bugzilla is a popular "Defect Tracking System" or "Bug-Tracking System" from Mozilla Foundation that allows projects to keep track of their outstanding bugs. Bugzilla provide a remote API in the form of a
Bugzilla::WebService that supports
XML-RPC and
JSON-RPC (1.0/1.1) protocols. In this post, I will explore the Bugzilla remote api and also look at the available open source Java client implementations including J2Bugzilla, B4J (Bugzilla for Java), Bugzilla Library, LightingBugAPI.
I must acknowledge that this study is funded by a project named ALMOSS being executed at the Center for Open Middleware (COM) at Universidad Politécnica de Madrid (UPM).
Bugzilla Web Service Interface
The Bugzilla remote API consist of several methods that are grouped in to five concepts ("Packages"), namely Bug, Product, Group, User, and Bugzilla. Different methods of the API are annotated with one of the following labels that describe the stability or the maturity of the method definition.
- STABLE - the parameters and return values will not to change between versions of Bugzilla. New method parameters or additional items return values may be added but always in backward compatible manner i.e. the old code will always continue to work with any new changes.
- EXPERIMENTAL - the methods that are almost stable, but with a slight chance that small parts will change in the future.
- UNSTABLE - methods definitions that are not guaranteed to stay the same between Bugzilla versions.
- DEPRECATED - methods that are replaced by other methods. The use of these methods are discouraged and eventually these methods will disappear from the API.
The following tables shows the methods of the each package along with their description and the color of the operation defines whether they are STABLE,EXPERIMENTAL, UNSTABLE, or DEPRECATED.
Bugzilla::WebService::Bug Package | Type | Operations | Since | Description |
Bug | Utility Functions | fields | 3.6 | Get information about valid bug fields, including the lists of legal values for each field. |
legal_values | | Tells you what values are allowed for a particular field. DEPRECATED - Use "fields" instead. |
Bug Information | attachments | 3.6 | It allows you to get data about attachments, given a list of bugs and/or attachment ids. |
comments | 3.4 | Get data about comments, given a list of bugs and/or comment ids. |
get | 3.4 | Gets information about particular bugs in the database. |
history | 3.4 | Gets the history of changes for particular bugs in the database. |
search | 3.4 | Allows you to search for bugs based on particular criteria. |
Bug Creation and Modification | create | 3.0 | This allows you to create a new bug in Bugzilla. |
add_attachment | 4.0 | This allows you to add an attachment to a bug in Bugzilla. |
add_comment | 3.2 | This allows you to add a comment to a bug in Bugzilla. |
update | 4.0 | Allows you to update the fields of a bug. |
update_see_also | 3.4 | Adds or removes URLs for the "See Also" field on bugs. |
update_tags | 4.4 | Adds or removes tags on bugs. |
Bugzilla::WebService::Product Package | Type | Operations | Since | Description |
Product | List Products | get_selectable_products | | Returns a list of the ids of the products the user can search on. |
get_enterable_products | | Returns a list of the ids of the products the user can enter bugs against. |
get_accessible_products | | Returns a list of the ids of the products the user can search or enter bugs against. |
get | | Returns a list of information about the products passed to it. |
Product Creation and Modification | create | | This allows you to create a new product in Bugzilla. |
update | 4.4 | This allows you to update a product in Bugzilla. |
Bugzilla::WebService::Group Package | Type | Operations | Since | Description |
Group | Group Creation and Modification | create | | This allows you to create a new group in Bugzilla. |
update | | This allows you to update a group in Bugzilla. |
Bugzilla::WebService::User Package | Type | Operations | Since | Description |
User | Logging In and Out | login | | Logging in, with a username and password. |
logout | | Log out the user. Does nothing if there is no user logged in. |
Account Creation and Modification | offer_account_by_email | | Sends an email to the user, offering to create an account. |
create | | Creates a user account directly in Bugzilla, password and all. |
update | | Updates user accounts in Bugzilla. |
User Info | get | 3.4 | Gets information about user accounts in Bugzilla. |
Bugzilla::WebService::Bugzilla Package | Type | Operations | Since | Description |
Bugzilla | Global | version | | Returns the current version of Bugzilla. |
extensions | 3.2 | Gets information about the extensions that are currently installed and enabled in this Bugzilla. |
timezone | | This method may be removed in a future version of Bugzilla. Use "time" instead. |
time | 3.4 | Gets information about what time the Bugzilla server thinks it is, and what timezone it's running in. |
parameters | 4.4 | Returns parameter values currently used in this Bugzilla. |
last_audit_time | 4.4 | Gets the latest time of the audit_log table. |
Bugzilla Java client libraries
There are several open source libraries that implement java clients for consuming Bugzilla::WebService. The following tables summarize the details of four Bugzilla Java client libraries that I've found.
B4J - Bugzilla for Java Name | B4J – Bugzilla for Java |
Licence | GNU LGPL v3 |
Current Version | 1.3 |
API Coverage | ??.??% |
Bug | Product | Group | User | Bugzilla |
?/13 | ?/6 | ?/2 | ?/6 | ?/6 |
Bugzilla versions | 1.0 - Bugzilla ? |
1.1 - Bugzilla ? |
1.2 - Bugzilla 4.2 |
1.3 - Bugzilla 4.x |
Protocol | XML-RPC |
Source code | in a public repo with svn SCM |
Dependencies | Apache XML-RPC, Apache Commons |
Developers | Ralph Schuster |
Notes | Focused on generating reports based on bugs records. |
Bugzilla LibraryName | Bugzilla Library |
Licence | Apache License 2.0 |
Current Version | 2.7 |
API Coverage | 18.18% |
Bug | Product | Group | User | Bugzilla |
5/13 | 0/6 | 0/2 | 1/6 | 0/6 |
Bugzilla versions | 1.0 - Bugzilla ? |
2.0 - Bugzilla ? |
2.6 - Bugzilla ? |
2.7 - Bugzilla 3.0.2 |
Protocol | HTTP POST with form-daya |
Source code | Bundled download |
Dependencies | Apache Commons |
Developers |
|
Notes | Used in ConQAT, an integrated toolkit for creating quality dashboards |
LightingBugAPIName | Lighting Bug API |
Licence | GNU GPL v3 |
Current Version | 4.0.1v20120822 |
API Coverage | 21.21% |
Bug | Product | Group | User | Bugzilla |
3/13 | 1/6 | 0/2 | 3/6 | 0/6 |
Bugzilla versions | 3.6.2.v20101201 - Bugzilla 3.6.2 |
4.0.1.v20120822 - Bugzilla 4.0.1 |
Protocol | XML-RPC |
Source | in Google Code project with svn SCM |
Dependencies | Apache XML-RPC |
Developers | Sebastian Kirchner, Dennis Hooth |
Notes | Provides some caching support to speed up the queries. |