Javascript API for Bugzilla XML-RPC Web Services

UPDATE: use bz.js instead!

The QAC (QA Companion) is a Firefox add-on that lets beta testers easily find bugs, run manual test cases on the browser, and get involved in the Mozilla community. Right now it’s a bit out of date and fragile. We’re going to be completely redesigning and reimplementing it. One thing we needed for it was a way to create and search for bugs in Bugzilla. The only way to do this is through Bugzilla’s XML-RPC interface. So my first project was to create a Javascript library that interfaces with Bugzilla’s web services interface. This basically acts as a JSON-RPC library that wraps the XML-RPC functionality (in Bugzilla 3.5 there will be a JSON-RPC interface).

The API docs are here as well as a link to download: bugzillaRPC. Because the library makes HTTP requests to the Bugzilla server, you can’t use it from regular content. You can however use it from any extension or chrome-privileged code. One thing we had hoped to have was account creation functionality. Unfortunately, a user with ‘editaccount’ privileges must be logged in to create an account for another user. This is a security hole for our project, but there is functionality for offering a user an account by sending them an email. I didn’t implement every function in the Bugzilla Web Services API, mainly the ones the project uses, but it’s extremely easy to extend. We hope other people can use this!