How to automatically create a Jira Software Issue from an OpsGenie alert
Asked by Elisa Escapa:

I have tried searching the Community (and Google) for this exact scenario, but have come up blank.

Illustrating an example (names changed for security): One of our OpsGenie alerts periodically comes in titled (Alias), "Transfer failed". We want OpsGenie/Jira Software to automatically create an Issue ticket in our "Tech Support" (TS) Project, when this alert is created in OpsGenie.

As far as I can tell, you can only configure this from OpsGenie \> Settings \> INTEGRATIONS \> Configured integrations \> Jira Service Management \> Settings \> **For other Opsgenie alerts:**

**![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/164762i3789D0035FFC5313/image-size/large?v=v2&px=999 "image.png")**

Is there no other way to automatically create issues from an OpsGenie Alert?

PS: We're already aware you can link issues to an Opsgenie Incident


Answers:
author: Nick H
body: Hi [@Elisa Escapa](/t5/user/viewprofilepage/user-id/4596056) ,

That is correct - the only way to create Jira issues from Opsgenie alerts is through the **For other Opsgenie alerts:**section within the integration.

Based on the screenshot you shared above, any alert that contained one of those conditions in the alias field of an alert would trigger the integration, and create in issue in the configured Jira project under these settings:

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

\^ That's where you'd configure Issue Type; Ticket, and Project Key; TS.

Hope this helps! Let us know if you have any additional questions.

comments: author: Elisa Escapa
body: Hi Nick, thank you so much for confirming!

If that's the case, then it sounds like there isn't a way to take this further and be able to map alert properties into issue fields? For example, say we had a custom field in Jira Software called *Issue Category*, and I want its value to be "Alerts: Transfer Failure" when the OG alert it was created from includes the words "Transfers failed" in that specific order.

I've heard about [OEC](https://support.atlassian.com/opsgenie/docs/set-up-an-action-channel-with-oec/) but not entirely sure whether that is a way to work around this?


author: Nick H
body: OEC is definitely what we suggest for working around this!

You would install the OEC service on a server, and it will sit in the middle of Opsgenie and Jira. Opsgenie alerts would send to OEC, which will then execute a script to create Jira issues. You can modify the OEC script to customize things such as configure it to set an Opsgenie alert field as a required custom field in Jira (such as the *Issue Category*).

Hope that helps! Let us know if you have any other questions.

EDIT: I should have mentioned this as well, but Opsgenie has a new Jira and JSM Integration Framework that offers the option to map custom required fields without using OEC! It's still in beta so if you'd be interested in testing, please open a ticket with Opsgenie support here: <https://support.atlassian.com/opsgenie/>

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


author: Elisa Escapa
body: Oh that's brilliant, thank you for suggesting the beta feature! I'll ask Support for access, thank you so much for going up and beyond a standard answer ?


author: Sterling Houghton
body: Nick - does this beta feature exist for Jira as well, or only JSM?


author: Nick H
body: Hi [@Sterling Houghton](/t5/user/viewprofilepage/user-id/4351704) ,

Yes this new integration framework is available for both Jira, and JSM


author: Edon Freiner
body: "Field 'labels' cannot be set. It is not on the appropriate screen, or unknown.",

I get this error when ever it tries to create a ticket, anyone know why?


author: Nick H
body: Hi [@Edon Freiner](/t5/user/viewprofilepage/user-id/4127367) ,

Like that error indicates, the labels field is probably not on the correct screen of the project / issue you are trying to create.

In Jira/JSM navigate to the Settings menu ? Issues tab ? Screens tab ? Configure the same project's screen that is configured in the integration's action mapping section:

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

Another way to check whether or not this field is available is by trying to create an issue in Jira/JSM with the same project + issue type configured in the integration:

![lab2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/196195i83BAA4EB8C1703B2/image-size/large?v=v2&px=999 "lab2.jpg")![lab3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/196197i635AD1D6928AF618/image-size/large?v=v2&px=999 "lab3.jpg")![lab4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/196196i8815C306DA4B3A03/image-size/large?v=v2&px=999 "lab4.jpg")

\^ This should tell you whether or not the field is available. Then you can follow the steps outlined in the first part of this comment to add it.


author: Edon Freiner
body: Thanks,

We dont really use labels what so ever.

I dont have it on any of my screens...

I also dont see a place where I can choose a screen on opsgeni.


author: Nick H
body: Hi [@Edon Freiner](/t5/user/viewprofilepage/user-id/4127367) ,

You choose the screen in Jira / JSM. It's outlined above where to find and edit this.

As well where to check through a test issue. Before creating the issue under the same project / issue type configured in Opsgenie integration, select the Find your field option.


author: Edon Freiner
body: Seems like this is what I get, but we dont use this field, why is opsgeni requiring us to use it?

![Screen Shot 2022-05-06 at 1.06.39 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/196278i73BCFE2C15E04A23/image-size/large?v=v2&px=999 "Screen Shot 2022-05-06 at 1.06.39 PM.png")

comments: author: Nick H
body: Opsgenie sends a label (fromOG) to Jira / JSM when an Opsgenie alert creates a Jira / JSM issue. Which is why it's required.


author: Edon Freiner
body: ahhh got it, ok thanks


Tags: jira

jira-software