OpsGenie>Jira - Set priority of created tickets
Asked by Mark Skrzypczyk:

I've been looking over the documentation for this integration (Jira Software Cloud) and the various settings in the integration in OpsGenie but can't see one that allows for setting the priority of any tickets that are first create in OpsGenie and sent to Jira.  

This is a new setup and we've decided to only push P2 or higher alerts over to Jira and I have that bit setup, however, they are showing at Medium (P3) in Jira.  

Whilst there is a trigger for "If Priority is updated" there isn't an action to perform in Jira to edit it on that side, with the only meaningful option being to add a comment which obviously isn't ideal.


Answers:
author: Lorena Kirkpatrick
body: [@Nick H](/t5/user/viewprofilepage/user-id/2540930) Our team is having this exact issue and we are currently thing to give this solution a go, however we cannot locate the "Global Policy" Space. Any chance this changed in the past 3 years? if not could you please point us in the right direction for finding it? Thank you!

comments: author: Nick H
body: Hi [@Lorena Kirkpatrick](/t5/user/viewprofilepage/user-id/5374769) ,

If you do not see a Global policies tab under your Settings, it's a limitation with your plan.

[Policies](https://support.atlassian.com/opsgenie/docs/create-and-manage-global-alert-policies/) are only included with the standalone Opsgenie Standard and Enterprise plans, and the JSM/O Premium and Enterprise plans.


author: Gunsa
body: -


author: Nick H
body: Hi [@Mark Skrzypczyk](/t5/user/viewprofilepage/user-id/3909082) !

Thanks for reaching out. At this time Opsgenie \> JSD does not have this functionality out-of-the-box. We do have an open feature request that I can certainly add you to though. In the meantime - the workaround requires a few steps in both Opsgenie and JSD.

In Opsgenie - you will want to create an Alert Policy (under the Settings tab \> Global Policies) that adds the priority to the alert's message or description field. Alert policies are used to modify alerts upon creation: <https://docs.opsgenie.com/docs/global-policies#alert-policy>

The setup might look something like this:

![priority 1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/94019i26AF64E772DD9CB3/image-size/large?v=v2&px=999 "priority 1.jpg")

Then in JSD you will want to add automation rules that filter on the priority that is now being sent in the ticket's Summary or Description. Similar to OG's Alert policies, Automation rules can be used to used to modify tickets upon creation (along with other actions): <https://support.atlassian.com/jira-service-desk-cloud/docs/set-up-rules-to-automate-repetitive-tasks/>

These can be added under Settings \> System \> Automation Rules. One of the rules might look something like this:

![priorty 2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/94020i735481B921D68B1B/image-size/large?v=v2&px=999 "priorty 2.jpg")

My rule above looks for "P1" in the Summary of the ticket and maps these to Critical priorities in JSD. Here is a test example as well:

![priority 3.2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/94025iE1358348A455C897/image-size/large?v=v2&px=999 "priority 3.2.jpg")![priority 4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/94024i092DFD87A1AF7B3A/image-size/large?v=v2&px=999 "priority 4.jpg")

Hope this helps! Please let us know if you have any followup questions.

Best,

Nick

comments: author: Gunsa
body: I am having the same issue, is there any way to sync the priority fields with out automation? has this been resolved?


author: Nick H
body: Hi [@Mark Skrzypczyk](/t5/user/viewprofilepage/user-id/3909082) , [@Gunsa](/t5/user/viewprofilepage/user-id/4633290) , and others,

We'll be releasing a new Jira/JSM integration framework soon that has the ability to map Opsgenie alert priority to Jira/JSM issue priority. Automation rules won't be needed like I mentioned above last year.

Having said that, the new integration framework is currently in Early Access, so to join the program, you'd have to enter a ticket with Opsgenie support here: <https://support.atlassian.com/opsgenie/>

Our team can get this enabled in your account. For more information about the framework as well, check out the new documentation: <https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira-software-cloud/>

Let me know if you have any other questions.


author: Andrew Bozanich
body: Hi [@Nick H](/t5/user/viewprofilepage/user-id/2540930)

I have created an Opsgenie integration with the newly released Jira integration with the hope of taking my alerts coming from 3rd party montioring systems, and creating a Jira software cloud ticket. I have gone through the steps to configure the custom fields on the integration and have selected it to create a P2 jira ticket. However when the Jira ticket is created it is always created as the default P3. I have tried this on multiple projects and have reviewed the data package being sent from OG to jira and found that it has the correct data there however Jira seems to ignore the selection/data being provided. Is there something on the jira side that needs to be checked or changed to see if its blocking that info from coming in? It is placing the other detail in the ticket, as an example we have a custom field for team selection and the team is selected when the ticket is created. It is only the priority field that is getting dropped.

Thanks for the help!

Andrew


author: Nick H
body: Hi [@Andrew Bozanich](/t5/user/viewprofilepage/user-id/3897664) ,

Do you have an outgoing action that maps certain types of alerts and their priority to Jira issues and the priority of those when opened?

Below is an example of how I've been able to map P1 Opsgenie alerts to Blocker Jira issues:

![njf1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/186705iC7D63FDCBD6863DD/image-size/large?v=v2&px=999 "njf1.jpg")![njf2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/186706iAA6425CBF336AC58/image-size/large?v=v2&px=999 "njf2.jpg")![njf3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/186704iFB0913380BA4405F/image-size/large?v=v2&px=999 "njf3.jpg")

![njf4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/186707iF1F46733D0B402ED/image-size/large?v=v2&px=999 "njf4.jpg")![njf5.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/186708i80B3563B4E803098/image-size/large?v=v2&px=999 "njf5.jpg")


Tags: cloud

jira-cloud