A single comment update in Jira makes multiple updates in Servicenow

Rachael12
Tera Contributor

Hello,

 

I have created a bi-directional integration between ServiceNow and Jira through Jira spoke.
The updates from ServiceNow to Jira is working fine but when I make an update in Jira, it sends multiple updates.

I have cloned 'Jira Webhook Process' and created by own flow by mapping the correlation and comment body to Additional comments in Jira.

Please assist as the multiple update in spamming tickets and also will cause performance issue.

 

Thanks in advance!

6 REPLIES 6

Abhishek145
ServiceNow Employee
ServiceNow Employee

Hello,
I believe the issue is related to the flow configuration. Please add a condition in the flow or subflow to prevent the loop. Duplicate comments are being attached to the incident due to bidirectional updates cycling between Jira and ServiceNow (Jira to SN > SN to Jira > Jira to SN, etc.). Before adding a comment from ServiceNow to Jira Issue, use the 'Look up Latest Comment on Issue' action and compare the worknote with the latest comment on the Jira issue. If they match, the flow should end, and no comment should be added. Similarly, in the subflow, use the 'Look up Record' core action to fetch the latest worknote on the incident. If the latest worknote differs from the comment coming from Jira, only then should the worknote be added to the ServiceNow incident.

Regarding the description becoming empty after updates, please review the subflow execution triggered by the webhook notification in ServiceNow. Check which field from Jira is mapped to the incident description in the subflow and the value being passed for the description during subflow execution. This will provide a clearer idea of how to adjust the subflow and resolve the issue.




Abhishek145
ServiceNow Employee
ServiceNow Employee

Additional points to consider:

  1. Ensure that only a single webhook is registered in Jira for each ServiceNow instance. If more than one webhook is registered, you may receive multiple updates from Jira in ServiceNow.
  2. For events such as comment_created or attachment_created, Jira triggers two events: one for comment_created or attachment_created and another for issue_updated. If you only want to update work note, make sure your subflow run only for the comment_created event by applying the appropriate condition in the routing policy record.