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.
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.
TimK.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, rule audit log shows single entry, but issue history shows that value has been changed twice by automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
TimK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.