Automation rule triggering twice

Matt Parks
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 2, 2024

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.

1 answer

1 accepted

0 votes
Answer accepted
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 2, 2024

@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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
This widget could not be displayed.
TAGS
AUG Leaders

Atlassian Community Events