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.
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.
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.
- 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
- In a new browser window, navigate to your Code Climate Dashboard.
- Mouse over your repository's name and click Settings.
- Select the Integrations tab.
- Next to JIRA, click Set Up.
- Paste the host domain into the Domain field. (e.g. yourjira.com:PORT, please exclude https://)
- Paste your JIRA user's email address in the Username field.
- Back in JIRA, create an API token by following the docs outlined here. Copy this token to your clipboard.
- Back in Code Climate, paste your JIRA API token in the JIRA password field.
- 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.
- Click the Administration icon at the top right and select Projects.
- Hover your mouse over the Edit link for the project you want to integrate with.
- In the lower-left corner of the screen notice the pid= section of the URL. Make note of this project ID number.
Back in Code Climate, enter the project ID number into the Project field.
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.
Ensure Active is checked and click Save.
- 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.
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.
- 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)
Updated over 2 years ago