Jira Integration

Follow

Jira Integration is an advanced feature allowing you to synchronize the crashes and errors it tracks on your application with your Jira tickets. You can create Jira tickets using the error information, e.g., a stack trace, directly from the Countly platform. Then, work on the bug ticket on Jira, and its resolution status, e.g., In Progress, will be synchronized both ways.

Availability

The Jira Integration plugin feature is available only in Countly Enterprise.

Getting Started

Generating the OAuth Key Pair

  1. Generate a private key.
openssl genrsa -out jira_privatekey.pem 1024
  1. Generate a certificate from the private key.
openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 365
  1. Extract the public key from the certificate.
openssl x509 -pubkey -noout -in jira_publickey.cer  > jira_publickey.pem

Setting Up the Jira Application Link

As an admin of your Jira site, navigate to the site top bar > cog icon > Products. In the next screen, navigate to the Application links in the left sidebar.

Jira-Integration-_-Countly.png

 

Create a new application link by entering your Countly instance's URL in the text box, and clicking Create new link. There will be an alert notifying you that there was no response from the URL you entered and that it may not be valid, disregard it and click Continue.

Jira-Integration-_-Countly-2.png

In the next step, fill in the Application Name field with anything you like, but we recommend "Countly". Leave the Application Type as "Generic Application". Click Continue, and the application link should be created successfully.

Jira-Integration-_-Countly-3.png

Now, configure OAuth by editing your newly created application link, and clicking the pencil icon on its far right side.

  • Navigate to Incoming Authentication. Fill in the following fields and click Save.
  • Consumer Key: Any string will do, we recommend something like a password, e.g., aec070645fe53ee3b37630.
  • Consumer Name: A short name to identify your Countly instance.
  • Description (optional): A short description to identify your Countly instance.
  • Public Key: The contents of the file jira_publickey.pem between but not including the lines starting with hyphens.

Jira-Integration-_-Countly-4.png



Setting Up the Countly Jira Integration Plugin Feature

Now, as a global admin of your Countly instance, go to Management > Settings and then scroll to Jira for crashes. The following screen will appear.

Countly-2.png

Fill in all the fields:

    1. Consumer Key: The arbitrary string you chose while setting up the application link on Jira.
    2. Jira API URL: URL of the Jira server, e.g., "https://foobar.atlassian.net".
    3. Callback URL: Fully qualified URL of the API server of your Countly instance, e.g., "https://foobar.count.ly".
    4. Private Key: The contents of the file jira_privatekey.pem between but not including the lines starting with hyphens.
    5. Authorize Countly to use your account to synchronize crashes by clicking Login. This should take you to your Jira instance, asking if you want to authorize your Countly application with the current logged-in Jira account.

Note that you must create corresponding Jira projects for your Countly applications. To do this for each application-project pair, go to Management > Applications > Select your application > App Settings panel > Jira for crashes.

Countly-4.png


Fill all the fields, keeping in mind that they are case-sensitive with Jira, for example, "To do" will not work if the Jira workflow state is "To Do".

  1. Project: Jira project key/slug to create an issue in, e.g., If your project is "Test Project", then your key/slug will probably be "TP".
  2. Issue Type: Jira issue name to create issues with, e.g., Bug.
  3. To Do States: Jira issue status names corresponding to unresolved crashes, e.g., To Do.
  4. Doing States: Jira issue status to track the ongoing issues.
  5. Done States: Jira issue status names corresponding to resolved crashes, e.g., Done.
How does Countly choose a Jira status to synchronize if there are multiple?

When a crash resolution change is made on the Countly side and needs to be synchronized with Jira, the first state on the corresponding configuration will be chosen. For example, "Done" will be chosen if the crash is marked as resolved and Done states are "Done" and "Canceled", in that order.

Creating a Jira Task for a Crash in Countly

Having set Jira Integration up, you can create a Jira task for any crash or error on Countly by clicking Create Jira Task in the Crashes/Errors menuNavigate to Crashes/Errors and click on Overview. You will see the screen below. Click on the three-dot ellipsis menu, and then select Create Jira Task.

Countly-6.pngThis will open a pop-up where you can edit the Jira task's title and body.

Countly-7.png

Configure the task's title and body, and click on  Create Jira Issue. You should see a notification informing you that the task has been successfully created.



Looking for help?