Skip to main content

 

 
Go Search
Home
Getting Started
Knowledge Base
Training
Discussions
Downloads
Platform SDK
  

 
 
VersionOne Community > Downloads > Integration Documentation > Bugzilla
 
VersionOne Bugzilla Integration

VersionOne Bugzilla Integration


Description

The VersionOne Bugzilla Integration (V1Bugzilla) creates defects in VersionOne based on bugs in Bugzilla. Using this integration your organization can manage and triage bugs reported by customers and promote them to VersionOne once you determine a fix is necessary.

Once the integraion is installed and configured, Bugzilla users can specify which bugs require engineering attention and they will automatically appear as Defects in the VersionOne repository. Additionally, when the defect is closed in VersionOne, the integration updates Bugzilla to reflect this change.

This integration supports multiple modes of operation.

  1. Assign an Issue — With this approach, bugs that require engineering attention are assigned to an "engineering" user in Bugzilla. This assignment is used to determine when to create Defects in VersionOne.

  2. Tag an Issue — With this approach bugs that require engineering attention are identified using custom fields on the bugs. The value of the custom field is used to indicate when to create Defects in VersionOne.

System Requirements

  • Operating System — Windows 2000, 2003

  • Framework — Microsoft .Net 2.0

  • VersionOne — Release 7.3 and above

  • Bugzilla — Tested with Release 3.0.1

Downloads

The latest version of V1Bugzilla is available at V1: Integration Downloads.

Installation

These installation instructions assume that Bugzilla is already installed, configured, and working properly.

1. Determine Install Location

V1Bugzilla can be installed on any server with network access to both VersionOne installation and Bugzilla. Exact placement should be determined by your internal software management requirements. The integation server must meet the System Requirements stated above.

2. Extract Files

Download V1Bugzilla using the link above and extract it into a folder of your choice.

3. Configure

Configuration for the Bugzilla Integration is a 3 step process.

4. Start up

Open up the command prompt, navigate to your installation folder, and run the following command:

VersionOne.ServiceHost.exe

If you have configured your system properly, you should see several [Info] messages followed by a [Startup] message.

5. Test the Service

  1. Create an bug in Bugzilla

  2. Set the appropriate state in order for the issue to move to VersionOne

  3. Verify that the issue appears in VersionOne as a defect

  4. Close the defect in VersionOne

  5. Verify that the Bugzilla bug has been updated

Shut down the service host by pressing "Q" in the console window.

6. Install as a Windows Service

Run the following command from the console window:

VersionOne.ServiceHost.exe --install

This command installs the service so it will will run under the account NT AUTHORITY\Local Service. Local Service must be given access privileges to the directory where the V1Bugzilla was installed so it can store its state and write to log files. Follow the steps below to change the security on the installation directory:

  1. Right click the installation folder from Windows Explorer.

  2. Select "properties".

  3. Select the "Security" tab.

  4. Click the "Add" button.

  5. Enter "Local Service" and click "OK".

  6. Click the "Allow" checkbox for the "Full Control" row .

  7. Click "OK" to save the changes.

For more information on how the Windows Service is configured see Service Host Configuration.

Configuration

Bugzilla Configuration

This section describes how to configure Bugzilla for use with VersionOne

  1. Install the VersionOne scripts on the Bugzilla. The VersionOne integration requires the addition of two script files to your Bugzilla installation.

    Table 1. 

    NameLocation
    v1.cgiPlace this file in the root of your Bugzilla installation. On Unix, this script must be marked as executable.
    V1.pmPlace this file under Bugzilla/WebService.

    You can verify the proper installation of these scripts using XMLRPCsh. Launch the program with the URL (i.e. http://localhost/v1.cgi) and execute the V1.Version command. The expected response is 1.0.0.0.

    Figure 1. 


  2. Select or Create a Bugzilla User. The integration requires a valid Bugzilla User Id and a Password in order to connect. This user must have sufficient rights to accept work and modify issues

  3. The integration requires that the project names used in Bugzilla match the project names used in VersionOne.

  4. The next step depends the approach for pushing Issues to VersionOne

    • Assign an Issue

      If you choose to push bugs by assigning them to the user identified in step 2, proceed to the next step.

    • Tag an Issue

      If you want to push bugs to VersionOne using a Custom Field, you need to do the following:

      1. Create the Custom field. It is recommended that you use a Drop-Down field and limit the values.

        Figure 2. 


      2. Populate the field with the desired values.

        Figure 3. 


  5. Create a 'Saved Search' to select the bugs you want pushed to VersionOne. It's recommended that you create this Filter using the same credentials used by the integration (user identified in step 2). It's beyond the scope of this document to describe how to create Filters in Bugzilla , but here are some filter ideas

    • Assign an Issue

      Using this approach, the easiest Filter is based on who the issue is assigned to ("Assignee is {user}") and Status (i.e. "NEW")

      Figure 4. 


    • Tag an Issue

      Using this approach, the easiest Filter is based on the value of the Custom Field defined in step 4.

      Figure 5. 


  6. Determine how to prevent Bugs from being pushed more than once. This decision is based on your Search and how you want issues pushed to VersionOne

    • Assign an Issue

      Using this approach, the simplest option is to change the Status. To do this you need to Accept the Bug

    • Tag an Issue

      Using this approach, the simplest option is to change the value of the custom field. To do this you need to know the value you want set in the custom field.

  7. Do you want the a URL to the VersionOne Defect to appear in Bugzilla?

    If so, you'll need to create a custom field in Bugzilla.

    Figure 6. 


VersionOne Configuration

  1. Add "Bugzilla" to the list of valid Source

    Figure 7. 


  2. The integration needs a text field in VersionOne store the Bugzilla identifier. By default this is the Reference field. If you are already using this field, you'll need to create a custom text field and note the name

ServiceHost Configuration

The configuration file for the Bugzilla Integration is VersionOne.ServiceHost.exe.config. This section describes the elements in the ServiceHost configuration file.

Table 2. BugzillaService Element

NameDescription
BugzillaUrlFully qualified URL to Bugzilla service. This entry must include the cgi you want executed (v1.cgi by default)
BugzillaUserNameValid Bugzilla Username. This user must have the authority to accept and modify work in the Bugzilla System
BugzillaPasswordPassword for specified user
BugzillaSearchNameName of saved search in Bugzilla used to select which bugs are pushed to VersionOne
BugzillaBugUrlTemplateTemplate used for creating link to Bugzilla in VersionOne
BugzillaBugUrlTitleTitle on VersionOne link
CreateFieldIdName of the Bugzilla custom field to update once the VersionOne Defect is created
CreateFieldValueValue to place in the Bugzilla custom field declared in CreateFieldId
CreateAcceptDetermines if integration will Accept the Bugzilla bug once a VersionOne defect is created. Valid values are True or False
CreateReassignValueBugzilla identifier of the user to assign bug to once a VersionOne defect is created
CreateResolveValueBugzilla 'Resolve' value to use once a VersionOne defect is created
CloseFieldIdName of the Bugzilla custom field to update once the VersionOne Defect is closed
CloseFieldValueValue to place in the Bugzilla custom field declared in CloseFieldId
CloseAcceptDetermines if integration will Accept the Bugzilla bug once a VersionOne defect is closed. Valid values are True or False
CloseReassignValueBugzilla identifier of the user to assign bug to once a VersionOne defect is closed
CloseResolveValueBugzilla 'Resolve' value to use once a VersionOne defect is closed
SourceFieldValueThe value to set in the VersionOne Source field. This must be a valid VersionOne Source
DefectLinkFieldIdBugzilla custom field containing URL to VersionOne defect

Example 1. BugzillaService Element when using the assignment approach.

Note the "CreateAccept" and "CloseResolveValue" elements.

<BugzillaService disabled="0" class="VersionOne.ServiceHost.BugzillaServices.BugzillaHostedService, VersionOne.ServiceHost.BugzillaServices" >
	<!-- Bugzilla Connectivity -->
	<BugzillaUrl>http://192.168.36.249/v1.cgi</BugzillaUrl>
	<BugzillaUserName>versionone@company.com</BugzillaUserName>
	<BugzillaPassword>versionone</BugzillaPassword>
	
	<!-- Bugzilla Search that finds artifacts to move into VersionOne -->
	<BugzillaSearchName>Tagged Defects</BugzillaSearchName>

	<!-- Links in VersionOne to Bugzilla Bug (we replace #key# with Bugzilla Issue id) -->
	<BugzillaBugUrlTemplate>http://192.168.36.249/show_bug.cgi?id=#key#</BugzillaBugUrlTemplate>
	<BugzillaBugUrlTitle>Bugzilla</BugzillaBugUrlTitle>

	<!-- Bugzilla change after a VersionOne Defect is created to remove artifact from search -->
	<CreateFieldId></CreateFieldId>
	<CreateFieldValue></CreateFieldValue>
	<CreateAccept>True</CreateAccept>
	<CreateReassignValue></CreateReassignValue>
	<CreateResolveValue></CreateResolveValue>

	<!-- Bugzilla change after a VersionOne Defect is closed -->
	<CloseFieldId></CloseFieldId>
	<CloseFieldValue></CloseFieldValue>
	<CloseAccept></CloseAccept>
	<CloseReassignValue></CloseReassignValue>
	<CloseResolveValue>FIXED</CloseResolveValue>
	
	<!-- VersionOne 'Source' value to use when Defect was created from Bugzilla artifact -->
	<SourceFieldValue>Bugzilla</SourceFieldValue>
	
	<!-- Bugzilla custom field to use for VersionOne Defect URL -->
	<DefectLinkFieldId>cf_versiononeurl</DefectLinkFieldId>
</BugzillaService>

Example 2. BugzillaService Element when using the custom field approach.

Note the "CreateFieldId", "CreateFieldValue", "CloseFieldId", and "CloseFieldValue" elements.

<BugzillaService disabled="0" class="VersionOne.ServiceHost.BugzillaServices.BugzillaHostedService, VersionOne.ServiceHost.BugzillaServices" >
	<!-- Bugzilla Connectivity -->
	<BugzillaUrl>http://192.168.36.249/v1.cgi</BugzillaUrl>
	<BugzillaUserName>versionone@company.com</BugzillaUserName>
	<BugzillaPassword>versionone</BugzillaPassword>
	
	<!-- Bugzilla Search that finds artifacts to move into VersionOne -->
	<BugzillaSearchName>Tagged Defects</BugzillaSearchName>

	<!-- Links in VersionOne to Bugzilla Bug (we replace #key# with Bugzilla Issue id) -->
	<BugzillaBugUrlTemplate>http://192.168.36.249/show_bug.cgi?id=#key#</BugzillaBugUrlTemplate>
	<BugzillaBugUrlTitle>Bugzilla</BugzillaBugUrlTitle>

	<!-- Bugzilla change after a VersionOne Defect is created to remove artifact from search -->
	<CreateFieldId>cf_versiononestate</CreateFieldId>
	<CreateFieldValue>Created</CreateFieldValue>
	<CreateAccept></CreateAccept>
	<CreateReassignValue></CreateReassignValue>
	<CreateResolveValue></CreateResolveValue>

	<!-- Bugzilla change after a VersionOne Defect is closed -->
	<CloseFieldId>cf_versiononestate</CloseFieldId>
	<CloseFieldValue>Closed</CloseFieldValue>
	<CloseAccept></CloseAccept>
	<CloseReassignValue></CloseReassignValue>
	<CloseResolveValue></CloseResolveValue>
	
	<!-- VersionOne 'Source' value to use when Defect was created from Bugzilla artifact -->
	<SourceFieldValue>Bugzilla</SourceFieldValue>
	
	<!-- Bugzilla custom field to use for VersionOne Defect URL -->
	<DefectLinkFieldId>cf_versiononeurl</DefectLinkFieldId>
</BugzillaService>

Table 3. BugzillaServiceTimer Elements

NameDescription
IntervalNumber of milliseconds to wait between polls to the Bugzilla system
PublishClassDo Not Change

Example 3. 

This example polls every 60 seconds

<BugzillaServiceTimer disabled="0" class="VersionOne.ServiceHost.Core.Services.TimePublisherService, VersionOne.ServiceHost.Core">
	<Interval>60000</Interval>
	<PublishClass>VersionOne.ServiceHost.BugzillaServices.BugzillaHostedService+IntervalSync, VersionOne.ServiceHost.BugzillaServices</PublishClass>
</BugzillaServiceTimer>

Table 4. DefectWriterService Elements

NameDescription
ExternalIdFieldNameName of VersionOne field that holds the ID of the Bugzilla issue. Must be a text field
Settings
NameDescription
ApplicationUrlVersionOne Application URL
UsernameValid VersionOne Username. This user must have authority to create defects in the VersionOne projects being processed.
PasswordPassword for specified user
APIVersionThe minimum application version required for this hosted service.
IntegratedAuthFalse if using VersionOne native security, true is using Windows Integrated Security. If VersionOne is configured to use Windows Integrated Security, the account the service is running as must be a configured VersionOne user with a project role of Team Member or higher. Also, Username and Password should be empty if IntegratedAuth is true.

Example 4. 

<DefectWriterService disabled="0" class="VersionOne.ServiceHost.DefectServices.DefectWriterHostedService, VersionOne.ServiceHost.DefectServices">
	<ExternalIdFieldName>Reference</ExternalIdFieldName>
	<Settings>
		<ApplicationUrl>http://v1host/VersionOne/</ApplicationUrl>
		<Username>admin</Username>
		<Password>admin</Password>
		<APIVersion>7.2.0.0</APIVersion>
		<IntegratedAuth>false</IntegratedAuth>
	</Settings>
</DefectWriterService>

Copyright © 2008, VersionOne, Inc. All rights reserved. This document was generated 2008-01-22 23:14:00.