This guide explains how to configure a Jira integration that enables two Jira-related Cmd trigger actions: one that creates Jira issues based on Cmd alerts, and another which updates existing Jira issues.
Each Jira integration lets you send data to just one Jira project, but you can create multiple integrations, and connect each with a different Jira project.
- Before an integration can be added to a project, a global admin must enable it.
- After that, a manager or admin can add the integration to a project.
- You need a Jira Cloud account (to generate an API token).
- 2FA must be configured for your Atlassian/Confluence account.
- The Jira project you select must not require a component for new tickets.
Step one: Jira setup
Jira API token
- To create a token, follow the instructions at: https://confluence.atlassian.com/cloud/api-tokens-938839638.html
- Save your token for later.
Note that if you lose your API token, you can replace it without consequence.
Jira project key
- In Atlassian, go to your projects page:
- Locate the "Key" for the project you want to integrate with Cmd.
- Save the key for later.
Step two: Cmd setup
- In the Cmd app, click your current project's title in the top right to open the dropdown menu.
- Choose Project & app settings, then click Integrations preferences on the left panel.
- Click Jira, then Add integration, which will open this window:
- Enter a name for the integration, to help identify it in the Cmd app (e.g. “Jira integration - test project”).
- Enter your Atlassian domain.
- Enter an email address associated with a Jira account on your domain. This account will be listed as the reporter of new issues identified via the integration.
- Enter your API token, and enter your Jira project key in the "project ID" field.
- Click Test integration.
- Assuming the configuration is correct, a new issue will appear in Jira under
“TO DO” called “Cmd alerts”:
- Click Save.
The “Update Jira Ticket” action
A working Jira integration will allow you to implement two additional trigger actions: 1) Create Jira ticket, and 2) Update Jira ticket. The former was already tested in the previous step, but to test the latter you will need to add it to a trigger. For more about adding triggers and trigger actions, see Adding new triggers and Understanding trigger actions.
When users activate a trigger with an “Update Jira ticket” action, they receive a prompt for an issue ID:
After entering a valid issue ID (e.g., “CD-09” in the above screenshot), the user can continue the session. You can configure which actions Cmd will take if the user fails to enter a valid issue ID. If the user enters a valid issue ID, that issue will be updated with a link to more information about what activated the trigger. Here is an example of a ticket that was both created and updated by the integration:
Jira does not allow a single integration to attribute new tickets and updates to multiple users. This means that a single Cmd-Jira integration can only create Jira tickets attributed to the single user whose email address was entered while configuring the integration in Cmd, regardless of which server operator caused the trigger to fire. (For example, all the Jira issues shown in screenshots above were attributed to the account associated with the email address which I used to set up the demo integration.)