I had seen multiple questions about users who had their Automation rule trigger twice and it was happening to me as well. I was able to figure out why it was happening in my case, so I thought I would share, in case it helped anybody else.
The rule was triggering when a transition was executed. In my case, the problem was that, as part of that workflow transition, I was also generating an additional event (besides the Generic Event) as a post function that was triggering a Scriptrunner listener.
As part of that listener, the issue was being updated and, as part of the update, an additional event was triggered. It appears that this additional event, because it was triggered from a post-function on the transition, caused the Automation rule to trigger a second time.
In my case, replacing the Generic Event post-function with the event that triggers the script listener and then removing the post-function that triggered that same event resolved the problem.
If it matters, I am currently running Jira 9.12.4.
@Matt Parks Thanks for sharing this to help others. If you can mark this as accepted it will help others find your answer here:
Reason for automation rule triggering twice:
The rule was triggering when a transition was executed. In my case, the problem was that, as part of that workflow transition, I was also generating an additional event (besides the Generic Event) as a post function that was triggering a Scriptrunner listener.
As part of that listener, the issue was being updated and, as part of the update, an additional event was triggered. It appears that this additional event, because it was triggered from a post-function on the transition, caused the Automation rule to trigger a second time.
In my case, replacing the Generic Event post-function with the event that triggers the script listener and then removing the post-function that triggered that same event resolved the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.