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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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

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.pngimage.pngimage.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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
AUG Leaders

Atlassian Community Events