OpsGenie Incidents as Jira tickets
Asked by Hendrik Moens:

Hi,

For our OpsGenie use case, I'm looking into how I can create Jira tickets associated with OpsGenie incidents when they are created.

I'm aware that integrations exist that work with alerts (<https://community.atlassian.com/t5/Opsgenie-questions/How-to-create-automaically-an-issue-when-an-incident-is-created/qaq-p/1664670>), but for our use case it doesn't make sense to have jira tickes for those as alerts come from many sources and can sometimes be too noisy. Incidents, on the other hand, must be added to our Jira for tracability.

I understand that in the worst case, it should be possible to DIY some kind of script that periodically syncs incidents to Jira, though that would obviously be my least preferred option. Are there any way we can use an existing integration in this case? Is there some other setup that would work for our use case?


Answers:
author: Darryl Lee
body: Hi [@Hendrik Moens](/t5/user/viewprofilepage/user-id/4985160),

This is Darryl. I am here to help. ?

Understand that you would like to know if there is any way to automatically link Opsgenie Incidents with Jira tickets.

Unfortunately, this is not feasible directly and as you mentioned, you can craft your own script to accomplish that.

However, the reason behind this logic is that Opsgenie Incident itself doesn't trigger any notifications, instead, it leverages the creation of **Responder Alerts** to trigger the notifications to the Users/Teams that are listed as Responders.

In the best practice, we recommend only filling in the wanted teams as **Responder Teams** upon the Opsgenie Incident creation, and configure the Filter of your Jira integration to match only the Responder Alerts to be pushed to create Jira issues.

![Screenshot 2022-07-14 at 17.00.21.png](https://community.atlassian.com/t5/image/serverpage/image-id/206034i1C0611B64C1C6759/image-dimensions/231x123?v=v2 "Screenshot 2022-07-14 at 17.00.21.png")

In this way, there will be only the Responder Alerts pushed to your Jira Tickets and they carry the information of the Opsgenie Incident.

Suggestion {#toc-hId--550859055}
--------------------------------

#### Background {#toc-hId--1657248940}

Every responder alerts have the key-value pair in the Extra Properties to represent the relationship with an Opsgenie Incident:

```
"incident-alert-type": "Responder"
```

![Screenshot 2022-07-14 at 17.00.21.png](https://community.atlassian.com/t5/image/serverpage/image-id/206031i100C1BA2D8C035C2/image-dimensions/231x123?v=v2 "Screenshot 2022-07-14 at 17.00.21.png")

We can leverage this.

#### Settings On Jira integration {#toc-hId-830263893}

Adjust the "Alert Filter" to be like this to locate the Responder Alerts.:

```
"Match all conditions below"
"Details (Key-Value Based)" | "incident-alert-type" | "Contains" | "Responder"
```

![Screenshot 2022-07-14 at 17.00.21.png](https://community.atlassian.com/t5/image/serverpage/image-id/206033i8A8E526666C3A3BB/image-dimensions/231x123?v=v2 "Screenshot 2022-07-14 at 17.00.21.png")

*** ** * ** ***

Last, here I attach a [short-paragraph document](https://support.atlassian.com/opsgenie/docs/add-or-remove-a-responder/) regarding the Incident Responder for your reference.

Hope this helps. ?

Kind regards,   
Darryl Lee  
Support Engineer, Atlassian

comments: author: Hendrik Moens
body: I suppose that approach might work, though linking directly to the incident would still fit our use case better (it's basically the incident comments and timeline that we'd like in the Jira issue).

Looking at the 'Add issue creation rule' in the opsgenie integration, I'm not seeing the option to match based on key-values (the closest I can get is 'Details Contains Responder). How can I match on Key-Value?

![Screenshot 2022-07-15 at 20-08-00 Opsgenie - Integration.png](https://community.atlassian.com/t5/image/serverpage/image-id/206320iEC6E93C71AA6AC37/image-size/large?v=v2&px=999 "Screenshot 2022-07-15 at 20-08-00 Opsgenie - Integration.png")

For completeness, you mention that "you can craft your own script to accomplish that". Are there any tools with Jira / Opsgenie we could leverage for this, or would this just be a standalone script that we trigger outside of atlassian that uses the OpsGenie / Jira API?


author: Darryl Lee
body: Hi [@Hendrik Moens](/t5/user/viewprofilepage/user-id/4985160) ,

I just tested this.

This new framework's filter matches the string in the Extra properties (Details) regardless its Key or Value.

So, my suggestion is to make it match the string "Responder" like this:

![Screenshot 2022-07-18 at 13.28.33.png](https://community.atlassian.com/t5/image/serverpage/image-id/206475i3BEEB4C66F301492/image-dimensions/178x166?v=v2 "Screenshot 2022-07-18 at 13.28.33.png")

Hope this helps.

Kind regards,   
Darryl Lee  
Support Engineer, Atlassian


Tags: cloud

jira