Integrating Collaborator with JIRA

Jira-Collaborator

Many Collaborator customers use JIRA as their bug tracking utility and, as a result, need integrate the two tools. Generally, their workflow dictates that they create JIRA Issues whenever they create reviews in Collaborator. The information found below describes the process for creating that type of workflow using Collaborator and JIRA together. This workflow and included example perl scripts could also be modified to support JIRA Issues being created only when Collaborator defects have been created. It’s also worth noting that, although we’re focusing on JIRA in this example, similar workflows can be done with other bug tracking utilities.

Finally, I’d like to give a big THANK YOU to one of our customers that was willing to share their expertise in creating this workflow. These descriptions and scripts are provided as examples in order to help customers create similar workflows. SmartBear does not offer professional services or support to help organizations modify the below workflow and included example scripts.

Okay, let’s get started.

The Workflow

When a review is created in Collaborator, a trigger is run that calls a perl script. This script creates a new JIRA issue that contains a URL link back to the Collaborator review. At the same time, a Review Custom Field in Collaborator is updated with corresponding JIRA Issue number and an automatic link is created that points back to the JIRA issue.

For the script to work correctly, a Collaborator group must be associated with a JIRA project. If no association exists, then a JIRA issue is not created. This is to ensure that JIRA issues are only created for some Collaborator groups and the JIRA projects that they are working on.

Requirements

  1. Collaborator Client (download appropriate version for your server)
  2. JIRA CMD Line utility
  3. Enable “Accept remote API calls” in JIRA System Settings
  4. Perl Installation
  5. Example Collaborator ReviewMirroring Scripts (click to download)
  6. Soon.exe (click to download)

Process

  1. Install the Collaborator Client on the system running the Collaborator Server
  2. Install the JIRA CMD Line utility on the system running the Collaborator Server
  3. Login to JIRA and go to the System Settings and enable “Accept remote API calls”
  4. Install Perl on the system running the Collaborator Server
  5. Download the Example Collaborator ReviewMirroring Scripts and extract them to a working directory on the system running the Collaborator Server
  6. Download and install soon_setup.exe on the system running the Collaborator server
  7. Modify the Collaborator Review Mirroring Scripts using the details found in the Modifying Scripts section
  8. Modify Collaborator using the details found in the Collaborator Configuration section
  9. Create a review – If you have problems, check the logs

Modifying Scripts

  1. Collab-jira-config.pl – Go through line by line and configure for your environment. Note the location of the log files for troubleshooting.
  2. mirrorReview.pl – Edit line 2 of this file to point to collab-jira-config.pl. Read through the file to get an understanding of what is happening. Modify the location of the jira.bat file. This shows up in 2 places within this file and should be on lines 28 & 30. This file shouldn’t require any future modifications.
  3. updateReview.pl – Edit line 2 of this file to point to collab-jira-config.pl. This file shouldn’t require any future modifications.

Collaborator Configuration

1. Create a Group – If groups are not already being used then create one. The group will be mapped to the JIRA project at the bottom of the collab-jira-config.pl file.

2. Review Created Trigger

  • Executable Example: C:\Perl\bin\perl.exe
  • Parameters Example: C:\workspace\Collab-ReviewMirroring\mirrorReview.pl ${review.id} ${review.group.title}

review-created-collaborator

3. Create a Review Custom Field

  • Type: String (Single-line)
  • Title: JIRA Issue – This must match collaboratorCustomFieldForJiraId in collab-jira-config.pl
  • Description:
  • Visible Phase: Any
  • Due By Phase: Any
  • Default Value:
  • Minimum Length: 0
  • Maximum Length: 255
  • Validator:

create-new-custom-field-collaborator

4. Automatic Links

  • Title: JIRA
  • Regular Expression Example: Demo-\s*(\d+) – This needs to match the JIRA Project
  • Case Sensitive: No
  • URL Format Example: http://127.0.0.1:8081/browse/DEMO-$1
  • Tooltip: JIRA Issue

edit-automatic-link-collaborator

5. Create or modify Review Template

  • Configure the template to include the newly created Review Custom Field
  • Enable the newly created External Link (Automatic Links)

 

See also:

 





Comments

  1. The workflow seems backwards to me. Why would you create an issue when creating a code review?

    Doesn’t it make more sense to create a code review populated with data about the issue and the solution, as the issue works it way through the workflow? For example, when it reaches the code review state after implementation?

    • jcollier says:

      This is the workflow that one of our customers wanted. They built this workflow to meet their needs.

      I can tell you that most teams prefer to create code reviews and reference the issues that they are working on.

  2. Does the plugin replace this? If so how do you remove this so the plugin will work. And lastly should this page be removed in favor of the plugin?

Speak Your Mind

*