Bugzilla
Converting Strings into Links to Issues
When Integrating TeamCity with Issue Tracker in addition to general settings, you need to specify which strings should be recognized as references to issues in your tracker. For Bugzilla, you need to specify Issue Id Pattern: a Java Regular Expression pattern to find issue ID in the text. The matched text (or the first group if there are groups defined) is used as issue number. Most common case seems to be #(\d+)
- this will extract 1234 as issue ID from text "Fix for #1234".
Requirements
If username and password are specified, you should have Bugzilla XML-RPC interface switched on. This is not required if you use anonymous access to Bugzilla without username and password.
Known Issues
There are several known issues in Bugzilla regarding XMLs generated for the issues, which makes it hard to communicate to. However it usually can be fixed by tweaking Bugzilla configuration.
If you see a path/to/bugzilla.dtd not found error, this means that the issue XML contains the relative path to the
bugzilla.dtd
file, instead of URL. To fix that you need to set 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 you need to make thetype_id
attribute#IMPLIED
(optional) in the bugzilla.dtd file. The issue and the workaround described in detail here.