Our JIRA integration enables you to turn issues flagged in Code Climate into JIRA issues in one quick click. For example, on your Feed page, mouse over a smell and click the "ticket" icon.

663

Note: For an organization-owned repository, you must be in an organization's Owners group to perform the actions described in this article. Alternatively, if you added the repository in question by clicking Add Open Source Repo, you must have GitHub-rights to administer the repository.

Show Me How

The steps below explain how to set up and test Code Climate's JIRA integration. Note that these steps will require you to move back and forth between Code Climate and JIRA.

  1. In JIRA, copy your host domain. This can be found in any URL while viewing your JIRA project. Copy the text between the https:// and the end of the domain. For example, codeclimate.atlassian.net would be the host domain of the following URL: https://codeclimate.atlassian.net/some_folder/CC
  2. In a new browser window, navigate to your Code Climate Dashboard.
  3. Mouse over your repository's name and click Settings.
637
  1. Select the Integrations tab.
  2. Next to JIRA, click Set Up.
804
  1. Paste the host domain into the Domain field. (e.g. yourjira.com:PORT, please exclude https://)
  2. Paste your JIRA user's email address in the Username field.
  3. Back in JIRA, create an API token by following the docs outlined here. Copy this token to your clipboard.
  4. Back in Code Climate, paste your JIRA API token in the JIRA password field.
  5. Back in JIRA, locate your project ID. To do so, click on Projects then select the project you would like Code Climate to post to.
238
  1. Click the Administration icon at the top right and select Projects.
288
  1. Hover your mouse over the Edit link for the project you want to integrate with.
160
  1. In the lower-left corner of the screen notice the pid= section of the URL. Make note of this project ID number.
  1. Back in Code Climate, enter the project ID number into the Project field.

  2. Optional: To automatically apply labels to the issues Code Climate posts to your JIRA project, in Code Climate enter a comma delimited string of relevant tags into the Labels field.

  3. Ensure Active is checked and click Save.

470
  1. To verify that the JIRA data is valid, click Test Service (this will post a test issue to your JIRA project). If a green message appears at the top of the screen, all is well. If a red error message is displayed, see Troubleshooting below.
804 679

Troubleshooting

If you are seeing a red error message after clicking Test Service:

  • For various reasons, our JIRA integration may not work with all self-hosted JIRA instances (e.g., those not hosted at atlassian.net). This is an issue we are aware of and can hopefully better handle in the future.
  • Ensure that you do not have any non-default JIRA fields marked as "required." If you do, you'll see an error message similar to the one below. Since our integration cannot populate these fields, they must be marked as "optional" in JIRA in order for our integration to work correctly.
701
  • Ensure there are no leading or trailing spaces around any of the input fields that you provided to Code Climate.
  • Ensure the email address you are using matches the email address located on your Profile settings page in JIRA. This name may differ from what you use to log into JIRA/Atlassian.
  • Ensure that you're pasting the Jira API token you created into Code Climate's JIRA password field. (see step 10 and 11 above)