Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why Jira Automation firing twice with different results?

Uldis Berzins November 16, 2023

I have an automation rule which fires at issue creation and is simple if/else-if/else block and sets issue field value based on checkboxes checked at issue creation.

Whenever the issue is created issue history shows that rule is fired twice with different results. Rule eventually set's correct value, but i can't understand why it tries incorrect value first. Rule audit log shows that correct if/elseif/else branch is selected.

 

I have another rule which is exact same but uses different fields and it never fires twice.

 

1 answer

0 votes
Tim Kopperud
Community Champion
November 16, 2023

Hi @Uldis Berzins, one reason for this can be that you have another rule triggering this rule. Check if the rule is allowed to be triggered from other rules by looking into the Rule details. Try to temporarly uncheck Allow rule trigger if it's cheched and test if it now fire twice. 

image.png

TimK.

Uldis Berzins November 17, 2023 edited

Thanks for reply, but that's not the reason. Checkbox is disabled.

Question is not only why it fires twice, but why produce different results when it fires.image.png image.png image.png

Uldis Berzins November 17, 2023

Now for some more strange behaviour.

Changed the trigger from "Issue created" to "Changed field value when issue created.

Out of 3 test 

- first one fired only once.

- Second and third again fired twice, but this time with same result.

image.png  

Tim Kopperud
Community Champion
November 17, 2023

Hi @Uldis Berzins, thanks for attaching in image of the rule, this is helpfull. Though I understand you get two different results let's first focus on the "rule executes twice".

Issue history only shows that the issue was editet twice, it doesn't actually show the number of rule executions. The rule audit log will show if the rule is fired twice. 

Can you confirm that you actually have two entries in the rule audit log? 

TimK.

Uldis Berzins November 17, 2023

No, rule audit log shows single entry, but issue history shows that value has been changed twice by automation.

Tim Kopperud
Community Champion
November 17, 2023

Hi @Uldis Berzins OK, good. Then we can conclude the rule is firing only once as wanted but the rule do edit the issue twice which is not wanted. I suspect the root cause is the rule itself. 

Can you add log actions into your rule, so we can see where it hits in the rules Audit log? E.g like I have done here:

image.png

TimK.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events