I have written an automation that increments a counter (custom field) and then compares the value to a set number. If the counter is less than the set number the issue is transitioned. The automation works except that the compare appears to happen before the counter has incremented.
I want the sub-task to Approved twice, so after first approval transition the counter is set to 1 and the issue is transitioned back to Approval status. After the second transition it should remain Approved. However, even though the Counter is being compared to the value 2, the rule has to run 3 times for the compare to work.
Any ideas why?
Hi @Neil Williamson -- Welcome to the Atlassian Community!
When the trigger issue for a rule is changed in the rule steps, that happens in the cloud. But the remaining rule steps continue to use the issue's fields as they were from the time of triggering. (i.e., the original values)
When you want the updated values, add a Re-fetch Issue action after your edit, and before the condition test.
Kind regards,
Bill
Okay, maybe that's the explanation, rather than parallelism. ;-)
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.
Hello @Neil Williamson
Welcome to the Atlassian community.
I don't fully understand it, but branches can be executed in parallel and this appears to apply to Conditions also. See this issue report and the one which to which it is linked.
https://jira.atlassian.com/browse/JSWCLOUD-22680
If you want to ensure that the two conditions execute in sequence I think you will have to split out the second condition to a separate rule that is triggered by a change to the Approver Count field.
There are others in this community that understand the parallelism of Automation Rule execution better than I do, such as @Bill Sheboy .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Trudy. I just read through the link, it was very interesting.
A switch to choose parallel or sequential processing of the rule would be great. Shame it doesn't exist yet.
I will try Bill's suggestion of the Re-fetch Issue first, but if no joy, then I'll split out the condition to a separate rule as you suggest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.