# How to Connect Teamscale to Jira Server

Teamscale integrates with Jira Server using Jira's built-in REST API.

Minimum Jira Version

Teamscale relies on Jira's REST API version 2, which is available with Jira Server 5.0 or later.

# Jira Integration Sample

When a commit was analyzed and an associated Jira issue has been found in the commit message (using the issue id pattern option), Teamscale can push its analysis results into the corresponding Jira ticket. Findings or test gap data will be aggregated on a per-issue basis like in the issue details view.

Jira Issue Integration Example

To enable Teamscale to update issues in Jira Server with Teamscale analysis results, you need to follow the steps:

  1. Ensure that the public base URL is configured correctly in Teamscale. For this, open the settings page ( Admin / Settings ) and check the entry Teamscale instance base URL in tab Server Settings . This should point to the URL of the Teamscale server.

  2. Select the Jira Issue Tracker connector during project creation.

  3. Select or create an account for the Jira server. The account fields should be filled out as follows:

    URI: Jira Server root URL (e.g., https://jira.my-company.com ).

    Username: The username of a user who has following permissions on the Jira Server:

    • Browse projects project permission for the Jira project(s) that contain the matched issues.

    • Edit issues project permission for the Jira project(s) that contain the matched issues.

    • If issue-level security is configured, issue-level permission to view the matched issues.

    Password: The user's password.

  4. Configure the Add to Jira issues Jira connector option. You can select which types of analysis results should be be added to Jira issues. The results can be injected into the issue's description and/or into Jira custom fields (type: textarea) that you specify in a comma-separated list. Details of Add to Jira issues connector option are available here. An example of a Jira issue field enhanced with Teamscale-generated data can be seen in the screenshot above.

  5. Complete Jira connector configuration and project creation as usual. Make sure the Issue ID pattern connector option is configured, since the integration builds upon this option to decide which Jira issues to update with Teamscale analysis results.

Notification Details

  • If the specified Jira custom field is not present for a referenced Jira ticket, nothing will be done (no error will occur).
  • Jira issues will only be updated if Teamscale's analysis is in the "live analysis" state.
  • if Shadow Mode is active, no information will be pushed to Jira.

E-Mail Notifications from Jira

Teamscale will try to suppress e-mail notifications for these updates, but it will only work if the Teamscale Jira user is either Admin or Project Admin, due to a Jira limitation: Atlassian Jira Ticket JRASERVER-34423

Render Errors in Jira

If Teamscale's data don't render properly in Jira, please see this troubleshooting guide.

# Teamscale Dashboards as Jira Gadget

To allow integration of Teamscale dashboards as Jira gadgets, follow those steps.

  1. Ensure that the public base URL is configured correctly in Teamscale. For this, open the settings page ( Admin / Settings ) and check the entry Teamscale instance base URL in tab Server Settings . This should point to the URL of the Teamscale server.

  2. In Jira go to a dashboard and click on Add gadget. In the next dialog select Manage gadgets. Note that this requires administrator access in Jira.

  3. Enter the following URL in the input field and press Add gadget: http://BASE-URL-OF-TEAMSCALE/api/gadgets/jira/dashboard.xml

The gadget should now be available and can be added to your Jira dashboard.