Problems automatically creating a Jira Software issue from an OpsGenie alert
Asked by ssllumiquinga:

I am setting up an integration between Opsgenie and Jira Service Management via webhooks, so far I can create an issue in Jira and it is created as an alert in Opsgenie, I add comments from opsgenie and these are reflected in the issues created in Jira, but when creating an alarm in Opsgenie is not reflected in Jira, how can I do?


Answers:
author: Nick H
body: Hi [@ssllumiquinga](/t5/user/viewprofilepage/user-id/4886968) ,

You'd first want to check the alert's activity log to see if there are any errors:

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

Typically if no issue is being created, there will be some 400 error that might better explain why the alert is not creating an issue.

If there is an activity log that shows, "*Sent \[createIssue\] action to Jira*" but no issue is being created, then the OEC checkbox in the integration might be selected, when most of the time it's not needed:

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

OEC is typically only needed for [on-prem Jira instances](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira/#Integration-via-OEC--for-Jira-Software-Server--amp--Data-Center-Usage-), and not cloud instances. So if this is selected, uncheck the OEC box \>\> save the integration \>\> and retest with a new alert.

Following that there might be some other 400 error, or the integration could work as expected. Let us know regardless.

comments: author: Nick H
body: This write up as well should help troubleshooting the issue:

[Opsgenie Alerts Not Creating Jira / Jira Service Management Issues](https://community.atlassian.com/t5/Opsgenie-articles/Opsgenie-Alerts-Not-Creating-Jira-Jira-Service-Management-Issues/ba-p/1563628)


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

I appreciate the information, I have reviewed the logs of an alarm and it shows me the error: ***Reason: 400 Bad Request: \[{"errorMessages":\[\],"errors":{"issuetype":"Specify an issue type" } }\]*** In this case, could you tell me how I can fix it please?  

In the input data when creating the alarm in Opsgenie  
![Captura de Pantalla 2022-04-20 a la(s) 15.37.43.png](https://community.atlassian.com/t5/image/serverpage/image-id/193820i55FEF952B7390EF5/image-size/large?v=v2&px=999 "Captura de Pantalla 2022-04-20 a la(s) 15.37.43.png")![Captura de Pantalla 2022-04-20 a la(s) 15.39.04.png](https://community.atlassian.com/t5/image/serverpage/image-id/193821i09F3E53A0B583621/image-size/large?v=v2&px=999 "Captura de Pantalla 2022-04-20 a la(s) 15.39.04.png")  


author: Nick H
body: Hi [@ssllumiquinga](/t5/user/viewprofilepage/user-id/4886968) ,

That error is more related to the integration, and the issue type not being recognized by Opsgenie.

If you have not already configured this part of the integration, you'll need to configure these fields:

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

The top of the other Community post shared above should provide more info into that:

[Opsgenie Alerts Not Creating Jira / Jira Service Management Issues](https://community.atlassian.com/t5/Opsgenie-articles/Opsgenie-Alerts-Not-Creating-Jira-Jira-Service-Management-Issues/ba-p/1563628)

[For alerts created by Jira](https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-jira/#For-alerts-created-by-Jira)


author: ssllumiquinga
body: [@Nick H](/t5/user/viewprofilepage/user-id/2540930) ,  

I managed to fix the error ***Reason: 400 Bad Request: \[{"errorMessages":\[\],"errors":{"issuetype":"Specify an issue type" } \].***   
In the JSM integration settings in Opsgenie, change the Issue Type Name field, as shown below  
![Captura de Pantalla 2022-04-20 a la(s) 16.29.34.png](https://community.atlassian.com/t5/image/serverpage/image-id/193825i9B33F09D9372026D/image-size/large?v=v2&px=999 "Captura de Pantalla 2022-04-20 a la(s) 16.29.34.png")  

Thank you very much for your help  


author: ssllumiquinga
body: [@Nick H](/t5/user/viewprofilepage/user-id/2540930) now, once the integration between Opsgenie and JSM is done, there is a way to export to JSM the alarms that were managed in Opsgenie before the integration??


author: Nick H
body: No I don't believe there is a way to do that; export a list of Opsgenie alerts and import them into Jira as issues.


Tags: jira-service-management