Forums

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

Automation moves on before previous step is complete.

Neil Williamson August 25, 2023

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.

Automation.JPG

 

Any ideas why?

 

2 answers

2 accepted

2 votes
Answer accepted
Bill Sheboy
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.
August 25, 2023

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

Trudy Claspill
Community Champion
August 25, 2023

Okay, maybe that's the explanation, rather than parallelism. ;-)

Like # people like this
Neil Williamson August 28, 2023

Okay, that makes sense. Thank you Bill.

Like Bill Sheboy likes this
0 votes
Answer accepted
Trudy Claspill
Community Champion
August 25, 2023

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 .

Neil Williamson August 28, 2023

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events