JSM integration for edit issue not working
Asked by Lewis Martins:

So I have configured my JSM integration on the Ops Genie side (under my team integrations) and on the JSM side by creating a web hook. I configured the web hook to trigger on issue creation or issue update.

The integration works great when I create a new issue that meets the criteria, but when I edit an issue I see a warning in the log and an alert is not created.

The payload for create issue and edit issue are the same except the webhook event field.

```
      "webhookEvent": "jira:issue_created",
```

vs

```
      "webhookEvent": "jira:issue_updated",

```

The error is

\[JiraServiceDesk-GIAS_Jira Service Management\] Skipping incomingData, no matching actions found

Why is it not working for issue_updated? Where are these 'actions' defined such that no matching ones were found? The Jira Service Management to OpsGenie side of the integration setup has just the field for API Key.


Answers:
author: Nick H
body: Hi [@Lewis Martins](/t5/user/viewprofilepage/user-id/2972009) ,

These actions can be defined under the integration's Advanced tab. Note this tab is only available on the Standard and Enterprise plans:

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

Here is where you can control what will happen to the Opsgenie alert when the JSM issue is updated, such as create an alert, ack it, etc. Examples:

![jsmcomm2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/173379iF3AF408844E512C4/image-size/large?v=v2&px=999 "jsmcomm2.jpg")![jsmcomm3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/173380i197138C3297732EA/image-size/large?v=v2&px=999 "jsmcomm3.jpg")

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

comments: author: Lewis Martins
body: So I don't have an advance tab, which I guess means we are not on the standard plan.

Is it expected that issue_update does not work on the lower plan?


author: Lewis Martins
body: Oh and we are on Standard plan of JSM. I don't see anywhere to manage the OpsGenie plan as it only shows up as a free app and isn't under 'manage subscriptions'


author: Nick H
body: The JSM Standard plan is the equivalent of the standalone Opsgenie Essentials plan - which does not include the advanced tab on integrations. You'd need to be subscribed to JSM Premium or JSM Enterprise for this functionality.

Out of the box and by default, the integration is not mapped to do anything when an issue is updated. This needs to be configured on the Opsgenie side if your plan offers it.

So unfortunately I don't think it'd be possible with your use case since this isn't offered, and the automation rule is happening after the alert is created.


author: Michael Vidallon
body: Hello Lewis,

We did the same setup. Some clarifications:  
1. Have you configured anything else in the Filter and Alerts Fields section in Opsgenie? Those right after the Settings section?

2. What type of Opsgenie alerts you plan to use?

3. Any specific jira issue field you updated and wanted(included in the payload) to reflect in Opsgenie side?

In my experience, you may configure either creating an alert, closing or acknowledging an alert in opsgenie depending on your desired action or behavior.

comments: author: Lewis Martins
body: All I really want to do is alert the on call person when a high priority issue is created after hours.

To do so, I have setup a team and the integration with JSM. Unfortunately, one piece of info we need to route the alert to the correct team is set in a JSM automation (on create, but technically takes place after creation) so the filter does not pick it up with issue creation.

![screen1.png](https://community.atlassian.com/t5/image/serverpage/image-id/173383iA3594CC8DB6BA06B/image-size/large?v=v2&px=999 "screen1.png")![screen2.png](https://community.atlassian.com/t5/image/serverpage/image-id/173384iC7E42A34A1719A19/image-size/large?v=v2&px=999 "screen2.png")


author: Michael Vidallon
body: I understand. Thanks for sharing. If this applies, you may use the trigger field value changed and then try using the assign alert API if the jira ticket assignee is what's updated from jira. (found in this [documentation](https://docs.opsgenie.com/docs/alert-api#assign-alert))

Use the API key from Opsgenie and the URL for POST method.

[https://api.opsgenie.com/v2/alerts/{{alias}}/assign](https://api.opsgenie.com/v2/alerts/:identifier/assign)

<br />

payload will include detail body like this: (see [documentation](https://docs.opsgenie.com/docs/alert-api#assign-alert) for actual formatting)  
"username":"username@yourcompany.com"

I don't think you need the webhook event name.  
See if that works.


author: Lewis Martins
body: Thanks. I did get the alert API working, though I haven't tried assigning it to particular member. The field that gets updates lets us know the group/team responsible for the issue. However, if it is off hours we don't want to bother the entire team, just the person on call.

If the API allows, I will see if I can get the oncall person from the team and send them an alert all from our JSM automation that sets the group/team responsible.


author: Nick H
body: Seems like you could manage that - *only notifying the on-call user(s) during off hours* - under a team's On-call tab.

Routing rules can be restricted to times, or days/times - such as after hours - and have alerts created during these times send only to the team's on-call schedule:

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

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


author: Lewis Martins
body: Thanks Nick! I wrote an API script to get the team's on call person and then create an alert where they are notified but it is visible to team.

This seems to do same thing, but much easier!


Tags: jira-service-management