JSM comments do not appear as notes in Opsgenie (closed) Alerts
Asked by Rosa M Fossi:

Hello Community,

I've got an integration that successfully creates an Opsgenie alert when the webhook is invoked based on JQL (project = ITAL issuetype = alert priority = highest)

The integration setup includes Add Note/Comment functionality that works both ways:

* if I add a ++note++ in the Alert, it posts as a *comment* in the ITAL ticket.
* *comments* added in ITAL ticket appear as a ++note++ in the Alert

This works great right up until the Alert is closed in Opsgenie. Then the functionality only works from Opsgnie to ITAL. The ITAL *comments* cease to appear as ++notes++.

Is this as designed? I can't wrap my head around why the integration works in one direction and not the other once the Alert is marked closed.

The debug log says:
> Discarding delayed incomingData, expired because alert does not exist.

Is the alert considered "non-existent" once it closes? I can still interact with it in Opsgenie. \<\<scratches head\>\>.

Screenshot of my "Add Note" config and debug log below:   

![CS_Alarm_Add_Note_Config.png](https://community.atlassian.com/t5/image/serverpage/image-id/156215i4E33F53263297615/image-dimensions/436x1055?v=v2 "CS_Alarm_Add_Note_Config.png")![opsgenie-debug-log.png](https://community.atlassian.com/t5/image/serverpage/image-id/156216i47BC31577BEBC312/image-size/large?v=v2&px=999 "opsgenie-debug-log.png")


Answers:
author: Skyler Ataide
body: Hi there Rosa!  

The functionality you have described is performing as designed. We typically see the error message that is being displayed, *Discarding delayed incomingData, expired because alert does not exist* , because the JSM ticket you added a comment to does not exist in Opsgenie *or* because the alert was closed in Opsgenie before the comment was added to the ticket. So, for the case that you have described, since the alert has already been marked closed prior to adding a comment on the JSM ticket, since there is not an *open* alert with the same alias value as the received integration request, the Add Note action is not processed.

Please let me know if this explanation helps, or if you have any further questions!

Best,

Skyler

comments: author: Rosa M Fossi
body: Hi Skyler, Thank you for your response! Your explanation makes sense (it was designed that way); however, the *why* does not.... but I will trust that there are excellent reasons as to the *why*, so I'll resist the urge inquire.

Instead I'll ask: Any way to get comments that get added to the JSM ticket after an alert is closed added as a note to that alert?


author: Skyler Ataide
body: Hi Rosa,

Happy to help! Unfortunately, at this time there is not a way to get comments that get added to the JSM ticket after an alert is closed automatically added as a note to that closed alert in Opsgenie. The Add Note action that you have set up works for this purpose, but only for an open active alert. This is because when an Add Note action is processed, Opsgenie looks for an open existing alert to add a Note to, and not one that is closed. You can add Notes to alerts manually after it's closed, but not through the integration rules.

I don't have the specific details regarding the *why* around this type of functionality at this time. Though, this use case certainly sparks curiosity. If I am able to gather more information revolving around this particular use case, I will be happy to cue you in with what I am able to find if that is something that you will be interested in. :smile:

Best,

Skyler


Tags: cloud

comment

integration

jira-service-management