Bugzilla


Access Bugzilla from Perl

BZ-Client 2 is now available in a developer release on CPAN and GitHub.

Example:

my $client = BZ::Client->new( url => $url,
user => $user,
password => $password,
autologin => 0
);
$client->login();
$ids = [ 69, 101 ];
my $bugs = BZ::Client::Bug->get( $client, $ids );

 


Access Bugzilla from Python

The python-bugzilla package is available on GitHub or PyPi

pip install python-bugzilla

This package provides two bits:

  • ‘bugzilla’ python module for talking to a Bugzilla instance over XMLRPC
  • /usr/bin/bugzilla command line tool for performing actions from the command line: create or edit bugs, various queries, etc.

This was originally written specifically for Red Hat’s Bugzilla instance and is used heavily at Red Hat and in Fedora, but it should still be generically useful.

Example

import bugzilla
bz = bugzilla.Bugzilla(url="https://bugzilla.kernel.org")
print bz.getbug(1)

 


Bugzilla 5.0 is right around the corner

Bugzilla 5.0 is right around the corner and honestly we’re a little excited.

Are you an early adopter?

Bugzilla 5.0rc2 is available now if you like to live on the bleeding edge. There aren’t any changes expected between now and when 5.0 is officially released in a couple of weeks. If you are interested in upgrading just let support know and we’ll take care of it.

Don’t have Bugzilla? Support can add it to your account at any time.

Don’t have an account? Get started in under a minute.

For everyone else we will follow our typical upgrade process. We will test 5.0 ourselves and monitor any issues other people in the community are running into. Once we are confident that 5.0 is stable enough we will send out an announcement about when the upgrade will happen and give you the option to opt out.

Here are some highlights of what you have to look forward to:

Improved WebServices

This release has major improvements in the WebServices interface. One big addition is a new REST-like endpoint alongside the existing XML-RPC and JSON-RPC endpoints. This will allow clients to access Bugzilla data using standard HTTP calls for easy development.

Several methods have been added and existing ones improved to allow returning data that was not available before such as Group.get. Bug.search is now as full featured as the Advanced Query UI allowing for the same searches to be executed. Attachment data such as flags and other metadata can now be updated through the API.

Also API key support has been added so that API calls will no longer need to use cookies or a user’s login and password.

Ability to Tag Bug Comments

Users can add tags, visible to other users, to bug comments. This gives the users the ability to thread conversations, mark comments as spam, identify important comments, etc. Users can hide comments that contain specific tags if desired. The tag input field also supports autocompletion so commonly used tags can be selected. Administrators can make specifically tagged comments be automatically hidden from view.

Other Improvements

There is now a “Preview” mode when creating a new comment that allows you to see how the comment will look before committing to the database. This will let you see the results of the “autolinkification” of bug references and links.

Bugs can now have multiple aliases assigned to them. Before each bug could only have a single value. Also, aliases are now visible in the browser’s title bar.

You can now choose to not receive any mail at all about a particular bug, even if you continue to have a role on that bug (e.g. reporter).

Some useful searches have been added to the Bugzilla home page.

Quicksearch now allows for use of comparison operators such as !=, >=, >, <, etc., in addition to substring searches.

The “Blocks” and “Depends On” values can now be displayed as columns in a bug list.

There are now INTEGER and DATE custom field types.

Bugzilla is now HTML5 compliant.

When a site administrator creates a new user, an email is sent to the user.

What isn’t included

Unfortunately the “Make Bugzilla Pretty” effort stalled and was replaced by incorporating the theme used by bugzilla.mozilla.org which also unfortunatly did not make it into 5.0, but is rescheduled to 6.0.


Github Integration

This integration will allow you to use GetHub commit comments to update bugs

This will cause any commit comments to be added to bugs references by the comment. E.g. the commit comment “This fixes bug 123” will cause “This fixes bug 123” to be added as a comment to bug 123.

You must configure both Github and devZing to make this work.

Github configuration

To configure GitHub click Settings when viewing your repository

2014-09-30_2112

Click Webhooks & Services

2014-09-30_2113

 

Click Add Webhook

2014-09-30_2115

 

 

 

Fill in the Payload URL:

  • If using the US datacenter use https://app.devzing.com/<account>/bugzilla/extensions/GithubWebhook/
  • If using the UK datacenter https://uk-bz1.devzing.com/<account>/extensions/GithubWebhook/

Content type can be either application/json or application/x-www-form-urlencoded

Feel free to add a secret as we will be supporting this soon.

Make sure you have selected “Just the push event” as other event types will be ignored.

Then click Add Webhook to save your webhook.

devZing configuration

Next log into your devZing account and click “Manage Global Settings”

In the “Github Integration” section select a Bugzilla user that will be used for the integration.

Click Save.

Using

In daily use just include the keyword “bug” next to the Bugzilla defect ID you want to update in the commit message. Remember that the Github webhooks aren’t executed until you push your changes and that there can be several commits in a single push. Every commit message in a push will be evaluated so you can update 1 or 100 bugs in a single push.


XML-RPC Client

From time to time we’ve had people wonder if the XML-RPC API is turned on for their Bugzilla installation. The answer is yes in all cases. Nevertheless it is difficult to verify as Bugzilla will not give you a meaningful response if you go to https://<mybugzilla>/xmlrpc.cgi in your browser.

Other clients want to verify some off error message they are getting from a tool that integrates with Bugzilla through the XML-RPC API.

To solve these questions we have deployed our online XML-RPC client.

xml-rpc client

By default it has the URL and credentials for our Bugzilla demo, but you can point it to any Bugzilla with XML-RPC enabled (even https://bugzilla.mozilla.org/).

The tricky bit is the parameter XML.

Bugzilla XML-RPC expects a single <struct> element. The names of the parameters listed in the API docs for each function are the <name> element for the struct <member>s. See Bugzilla::WebService::Server::XMLRPC and Bugzilla::WebService for more information.

For example

<param>
 <struct>
 <member>
 <name>Bugzilla_login</name>
 <value>demo@devzing.com</value>
 </member>
 <member>
 <name>Bugzilla_password</name>
 <value>password</value>
 </member> 
 </struct>
</param>

This is the minimum set of parameters for Bugzilla 4.4.x as almost all methods require authentication.

To retrieve a bug you need to set the method to Bug.get and parameter XML to something like the following:

<param>
 <struct>
 <member>
 <name>Bugzilla_login</name>
 <value>demo@devzing.com</value>
 </member>
 <member>
 <name>Bugzilla_password</name>
 <value>password</value>
 </member>
 <member>
 <name>ids</name>
 <value>
   <array>
     <data>
       <value><i4>12</i4></value>
     </data>
   </array>
</value>
 </member>
</struct> 
</param>

For more information on how to represent various data types see the XML-RPC specification.


All Bugzilla Accounts Upgraded to 4.4.5

Bugzilla 4.4.5 is a security release which addresses the following issue:

Adobe does not properly restrict the SWF file format, which allows remote attackers to conduct cross-site request forgery (CSRF) attacks against Bugzilla’s JSONP endpoint, possibly obtaining sensitive bug information, via a crafted OBJECT element with SWF content satisfying the character-set requirements of a callback API.

For more details see: https://bugzilla.mozilla.org/show_bug.cgi?id=1036213

Interestingly this bug only seems to affect Firefox users.


Bugzilla 4.4 Released

Welcome to Bugzilla 4.4! This new major release comes with several new features and improvements. This release contains major improvements to WebServices, which was the main target in this release, a rewritten tagging system, a real MIME type auto-detection for attachments, performance improvements and lots of other enhancements.