Integrating TeamCity with Bugzilla
You can integrate TeamCity with Bugzilla (3.0 or later) to provide links to Bugzilla issues from the TeamCity UI.
Displaying Links to Bugzilla Issues in TeamCity UI
When integration with Bugzilla is enabled, TeamCity automatically detects issue IDs mentioned in the comments of VCS commits. It transforms these IDs into links to the corresponding issues in Bugzilla and displays them to TeamCity users in the UI:
To see the basic details of a issue in the TeamCity UI, open the Changes tab of the related build’s results and hover over the icon next to the issue ID.
Issues fixed in the build can be viewed on the Issues tab of the build results.
To view issues related to a whole build configuration (not only to individual builds), use the Issue Log tab of the Build Configuration Home page. You can filter the list to a particular range of builds and/or enable the Show only resolved issues option to display only issues fixed in the builds.
Follow these recommendations to get the maximum benefit from the Bugzilla integration:
When committing changes to your version control, always mention the issue ID related to the fix in the comment to the commit.
Mark fixed issues as Resolved in Bugzilla to display them with the Fixed status in TeamCity logs (the time of resolve does not really matter).
Configuring Connection to Bugzilla
To enable the integration, create a connection to Bugzilla on the Project Settings | Issue Trackers page and specify the following settings:
Setting | Description |
---|---|
Connection Type | Select Bugzilla from the list. |
Display Name | Specify the connection name to distinguish it from the other connections. |
Server URL | Enter the URL of your Bugzilla instance. |
Username | Enter a username of your Bugzilla user account. |
Password | Enter a password for your Bugzilla user account. |
Issue ID Pattern | Specify a Java Regular Expression pattern to recognize an issue ID in the comment text. The matched text (or the first group if there are groups defined) is used as the issue number. The most common case is |
Note that a user specified in the connection to Bugzilla should have sufficient permissions to view Bugzilla issues. This will allow TeamCity to retrieve the information about issues and display it in the UI.
Known Issues
There are several known issues in Bugzilla regarding XMLs generated for the issues, which makes it hard to communicate with it. However, this can usually be fixed by tweaking the Bugzilla configuration.
If you see the path/to/bugzilla.dtd not found error, this means that the issue XML contains the relative path to the
bugzilla.dtd
file, and not the URL. To fix that, set the server URL in Bugzilla.Sometimes you may see a
SAXParseException
saying that Open quote is expected for attribute type_id associated with an element type flag. This happens because the generated XML does not correspond to the bundledbugzilla.dtd
. To fix it, make thetype_id
attribute#IMPLIED
(optional) in thebugzilla.dtd
file.