Alert note field DOES NOT add when adding new Jira comment
Asked by serge calderara:

Deal all,

We need to add a note in Alert when a new comment is added in our Service managment ticket created by the Alert.

When we acknowledge the alert, the Jira issue comment field is updated correctly

but when we add from jira a new comment, the comment is not going back to the Alert note and the log says that No action found

The integration for Add note is fully there as seen below :

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

Here is the log data

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

As you can see from log the comment field is set and web hook event is correct

What is wrong in this which prevent this action to execute ?

regards


Answers:
author: Nick H
body: Hi [@serge calderara](/t5/user/viewprofilepage/user-id/3385932) ,

That Webhook Event value is not correct. As your log shows, the value needed is:

Webhook Event Equals comment_created

NOT jira:comment_created

-Nick

comments: author: serge calderara
body: Hello [@Nick H](/t5/user/viewprofilepage/user-id/2540930) , so stupid I am, thanks it works now.

based on that I still have a question

Let say that my Service managment Incident issue type has a particular workflow with different status.

Q1 : If I resolve the incident from SM, is there a way to sync it back to resolve Incident in Opsgenie ?

Q2 : if we resolve the Incident from Opsgenie, what happen if the SM incident issue type workflow Resolve state has a condition, is it skipping the condition or does Resolve state should be fully allowed at a given time ?

regards


author: Nick H
body: Q1 : *If I resolve the incident from SM, is there a way to sync it back to resolve Incident in Opsgenie*?

Are you referring to resolving an Opsgenie incident from a JSM issue, or an Opsgenie alert? We categorize the two differently.

If you resolve the JSM issue / incident, yes this can close the corresponding Opsgenie alert.

At this time, you cannot resolve an Opsgenie incident from a JSM issue / incident. You'd have to do this within Opsgenie.

Q2 : *If we resolve the Incident from Opsgenie, what happen if the SM incident issue type workflow Resolve state has a condition, is it skipping the condition or does Resolve state should be fully allowed at a given time*?

We'd recommend the Resolve state be available for all statuses. Otherwise, this could cause issues like 400 errors.

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

Hope this helps!


author: serge calderara
body: [@Nick H](/t5/user/viewprofilepage/user-id/2540930) thanks, sounds more clear now.

By the way now we are able to update note from jira issue comment.

BUt still a last question :

From the Alert, when it is assign to a user, is tehre a way to sync the Alert Assignee with the Jira SM issue assignee ?

regards


author: Nick H
body: Out-of-the-box - there isn't a way to assign the JSM issue to the user that ack's the Opsgenie alert. I believe we have a feature request for this that I can add you to.

In the meantime, we have seen some customers using [Automation Rules](https://www.atlassian.com/software/jira/guides/expand-jira/automation) in JSM to build this functionality. I'll map the steps below:

In Opsgenie - Map the integration to add a comment on the ticket when the alert is acknowledged:

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

\^ this will consistently add a comment on the JSM issues with something like:

"User XYZ acknowledged alert:"

Then in Jira - create an Automation Rule that filters on this comment, and assigns the corresponding user to the issue:

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

Here's an example of that in action:

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

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

One thing to be aware of is you'd need an automation rule for each user, so it's not exactly scalable on a larger level, but it is realistically the only workaround at this time.

-Nick


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

Could it work that way :

When Team user ACK teh alert from opsgenie, the comment is added, but Alert is not yet assign in opsgenie on Acknowledge.

The user press Assign button in ALert and select a user from the team

1 - Is there a way to add the slected user in a comment when Alert is Assigned ?

2 - is there a way then to extact that user wthin automation rule ?

3 - Or does the Alert Asignee user can be mapped to a jira issue information as extenstion property ?

regards


author: Nick H
body: You can map a number of different Opsgenie alert actions to add comments on the JSM issues - like if the alert is assigned to another user, Ownership is taken, etc.:

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

Then use the steps outlined above with automation rules - filtering on the comment - and having the automation rule complete an action - like assign it to a user:

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

The comment will vary depending on the action. If I wanted to filter on the comment above when assignment is taken, I'd probably want to used "to User XYZ."

Again - we don't have anything out of the box so using automation rules for this use case is the closest workaround.

I'd suggest you do some testing on your end - adjusting what Opsgenie alert actions are taken, how they post as comments, how you want your automation rules to act, etc.


author: serge calderara
body: hello [@Nick H](/t5/user/viewprofilepage/user-id/2540930) , I will give a try.

Some precision if you don't mind on Alert.  
We notice that one an Alert is occuring and an Incident is created based on incident rules , 3 things happen.

1 An incident is created  
2 The source Alert is associated to the incident and flag as A  
3 A responder Alert is created as well with flag R

Should the team work in Associated Alert or Responder Alert ?  
As the Associated alert has a responder team define and user can be notified from this alert, what is the use of creating a Reponder Aler ?

regards