We’ve built a Freshservice-Mavenlink integration app. We create a Mavenlink project whenever a certain set of fields in Freshservice have values present in them.
For this we listen for updates in the ticket to run checks before creating our project in Mavenlink. I noticed a lot of duplicate projects in Mavenlink and traced the issue back to Freshservice wherein the product event “onTicketUpdate” is being fired multiple times for just one set of actions performed. This happens parallelly within barely a second interval which is resulting in duplication of projects in Mavenlink due to multiple parallel executions of our app code.
I shall attach two sets of logs with two different message ID’s that were triggered for the same set of actions on the ticket. It seems like the update button was clicked on the ticket and two of these product events have been triggered for it.
Product - Freshservice.
APP ID - “31815_82427”
From the message ID’s in logs, it can be observed that these two events are occurring almost simultaneously for the same time stamps and my guess is that one set of actions or an update is getting split into two of these events (possibly). It can be noticed that only or two of the lines in the logs differ (pertaining to the fields list that has new values) and the rest of the logs are the exact same set of actions being performed.
Any help here would be greatly appreciated.