P4bugzilla

About This Project
The P4 Bugzilla Bridge integrates P4 and Bugzilla. It runs as a daemon monitoring Perforce for any checkin that contains a reference to a bug. When it detects such a reference it posts the checkin comment as a comment to the relevant bug and optionally marks the bug as resolved.

The p4 Bugzilla Bridge will only respond to checkin comments that have a specific format, those that match either of these regular expressions:

[Bb]ugs?:?\\s*?(#?(\\d+)[\\s,]*)+ [Bb]ugfix:?\\s*?(#?(\\d+)[\\s,]*)+

For example: bug:1234 or Bugs: 1,2,3 4, 5 or Bugfix: 1121 or bug #42

When the Bugfix keyword is used the bug is also marked as resolved.

Advantages/Disadvantages
One advantage of this tool is that it doesn't require people to use Perforce jobs. It provides a direct integration between p4 and bugzilla. If you use Perforce jobs then this is not the tool for you.

Building
To build the tool into a Java jar just run ant

ant jar

There is also an option to produce an RPM for installation on an RPM based Linux system such as Fedora, Centos etc.

ant rpm

Configuration
You must configure the daemon to suit your environment. Look at the file p4bugzilla.conf. In there are the various items that must be tailored to each environment. Specifically configure the:
 * Perforce server
 * Perforce user
 * Perforce password (optional)
 * Bugzilla server
 * Bugzilla user
 * Bugzilla password
 * The list of users that will be monitored

How it Works
The code is derived from the Java version of the p4 review daemon and uses an older version of the P4 Java API.

To communicate with Bugzilla the tool uses the Bugzilla XML RPM interface.


 * http://ws.apache.org/xmlrpc/index.html
 * http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Server/XMLRPC.html
 * http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Bug.html
 * http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/User.html
 * http://www.bugzilla.org/docs/3.2/en/html/api/Bugzilla/WebService.html

TODO
Nothing planned.