Setting OpsGenie Alert Priority via a Jira custom field


 

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

   

Scenario

While Priority Schemes are not yet available in Jira, teams will usually use a custom field to emulate a priority scheme to be used for a single specific project. However, that can cause issues when integrating their projects with OpsGenie, as currently it is not possible to map Jira custom fields to OpsGenie.

In this article we'll use workflow post functions to workaround those limitations and have new alerts created with the appropriate priority.

Requirements

  1. Be a Jira Administrator.
  2. Have a Select List custom field with your desired priorities.
  3. Add the priorities from the custom field above to your global priorities.
  4. Add the custom priority field to the appropriate Request Types.

The Workflow Post Function

WIth the above requirements met, follow these steps:

  1. Select > Issues.

  2. Click Workflows and then Edit for the relevant workflow.

  3. Select the Create Issue transition:

    • In diagram mode, select the transition arrow.

    • In text mode, select the transition's name from the Transitions (id) column.

  4. Open the post functions tab:

    • In diagram mode, click Post functions in the properties panel to show the triggers configured for the transition.

    • In text mode, select the Post functions tab.

  5. Click Add post function.

  6. Select the Copy Value From Other Field post function and click Add.
    1. In the Source field, select your custom priority field.
    2. In the Destination field, select the Priority field.
  7. Add the post function and choose Publish Draft to finalize your changes.

Configuring the OpsGenie automation

After setting up the post function above, we can add different rules to our OpsGenie/Jira integration!

To create an incoming automation rule:

  1. Go to Settings > Integrations.

  2. Select your Jira integration to view its detals.

  3. Under Incoming automation rules, select Add rule.

  4. Enter Rule name.

  5. Select Create alert as the Rule type.

  6. Add a condition to match one of the priority levels in your custom priority field.

    1. Repeat steps 3→6 for each level of priority. In the end, the automations should be similar to the screenshot below:
  7. If you’d like to enable this rule now, select Enable now checkbox.

  8. Select Save to add the rule.

And that's it! Now alerts should be created with the appropriate priority based on your custom priority level!



Last modified on Oct 24, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.