Rootly to Jira Sync
This page details the configuration to have Rootly write to Jira.
The Create Jira Issue action is used to create a new ticket in Jira. In order to create an issue into Jira, you must select the specific project to created the ticket into (Project Key field) and select the Issue Type to create the ticket in.
This workflow action can be used to create Jira tickets for either incidents or action items. It recommended that you use the Create Jira Subtask for action items. However, if your project teams don't use subtasks, you can use this action to create Jira issues as well.
The Update Jira Issue action is used to update an existing ticket in Jira. In order to update an existing issue in Jira, you must reference it in the Jira Issue to Update field using the {{ incident.jira_issue_id }} variable.
This workflow will only work if you have initially created a Jira issue for the incident or action item.
The Create Jira Subtask action is used to create a subtask under an existing Jira issue. In order to create a subtask for an existing Jira issue, you must you must reference the original Jira issue in the Parent Jira Issue field using the {{ incident.jira_issue_id }} variable. The Project Key entered here must be the same as the one used in the original Create Jira Issue action.
This workflow action is intended to be used for action items or sub-incidents.
Jira has a native field called Labels. The syntax to set this field is different than the one used to set a custom field of the labels type.
Jira has a native field called Team, but it's stored as a "custom field". In addition, it only allows a single team to be selected. To map to this field in Jira, you'll need to use the following syntax format:
The Default tabs in each of the above workflow actions will allow you to set default Jira fields. If you have custom fields defined in your Jira project or would like to dynamically set Jira fields, you will need to do so via custom mapping in the Advanced tab.
It is highly likely that your Jira projects contain custom fields. The default tab in the above workflow actions will not be sufficient in mapping to these custom fields. You will need to input the custom snytax in the Custom Fields Mapping field in the Advance configuration tab.
In order to map to custom fields in Jira you would need to know the following information:
- The custom field id in Jira
- The field type in Jira
- The incident property that you would like to map from
This Atlassian article will show you how to find the id of the Jira custom field id.
These are the field types that a Jira custom field can have.
Liquid variables for Rootly incident properties can be found here.
Map to Jira custom text or paragraph field type.
Map to Jira's custom single select field type.
Map to Jira's custom muti-select field type.
Map to Jira's custom labels field type.
Map to Jira's custom number field type.
Map to Jira's custom datetime field type.
Dyanmically set Jira priority field based on incient severity.
Add comment to existing Jira issue.
Link Jira issue created for action item to existing issue created for incident.
Set Jira's native Labels field in Jira. Since this is a native field in Jira, it can be updated via the API Payload field.
Set default Components field in Jira. Since this is a default field in Jira, it will need to be updated via API Payload field.
Typically, teams like to use the Services field in Rootly to represent Components in Jira. The sample below shows this common scenario. You can use other Rootly multi-select fields to represent Components in Jira as well, just make sure you adjust the code below to reference the Rootly property you're using.
I order for this to work, you MUST ensure that the name of the Service in Rootly matches EXACTLY the name of the Components in Jira.
Below are common errors you might run into during your configuration process. To view the error response, you can locate the specific workflow you're trying to debugg, select ... > View Runs > View.
Error | Comment |
issue_id cannot be null. | Reason for error... This often happens on Update Jira Issue action. This means the reference Jira issue you're attempting to update does not exist. How to fix... Ensure your workflow does not run until AFTER a Jira issue has already been created and linked to the incident. |
"customfield_12345": "Custom Field is required." | Reason for error... This means the specified custom field is configured as a required field in the Jira project and you workflow isn't passing it any value. How to fix... You can either add custom fields mapping to map to the specific field or configure the Jira project to make the field optional. |
unexpected token at '{ "customfield_10032": }' | Reason for error... Your custom mapping syntax is inncorrect. How to fix... Correct your mapping sytnax. |
Specify a valid project ID or key | Reason for error... This means the Jira Project Key you've selected in the action is not available in the selecte Jira instance. How to fix... Reselect the Jira Instance and then reselect the Project Key. |
The issue type selected is invalid. | Reason for error... This means the Jira Issue Type you've selected in the action is not available in the select Jira project. How to fix... Reselect the Project Key and then reselect the Issue Type. |
If you need help or more information about this integration, please contact [email protected] or start a chat by navigating to Help > Chat with Us.