Automation question concerning multiple condition-action-blocks in succession

Sebastian Krzyzanowski February 4, 2021

Hello.

I'm trying to set up an automation rule which will be triggered upon sprint completion. 

Since you can't use if/else conditions inside of branches I just "chained" two conditioned actions. My question is: doing it this way, will the second action (yellow rectangle) ever get executed at all? Or will the condition "status does not equal ready for preview" prevent all issues which actually are "ready for review" to get beyond this first highlighted condition/point? 

auto.PNG

 

1 answer

1 accepted

1 vote
Answer accepted
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Hi @Sebastian Krzyzanowski 

The latter part of the rule will never activate. This is because the original conditions will prevent issues from passing forward down to the second set of conditions / actions.

However, you could break the rule into two separate branches, which can operate similar to If/Else for related issues. The branches will operate in order.

So the rule would be:

  • Trigger: Sprint completed
  • Branch: For issues in sprint
    • Condition: Issue fields condition - Issue Type = Story, Change
    • Condition: Issue fields condition - Status != Ready for Review
    • Action: Transition issue - Ready for Planning
  • Branch: For issues in sprint
    • Condition: Issue fields condition - Status = Ready for Review
    • Action: Transition issue - Ready for LAK-Testing

Because there are now two branches, whilst some issues will fail the first branch conditions, they'll succeed in the second branch and both sets of actions will complete.

Ste

Sebastian Krzyzanowski February 4, 2021

Thanks for the confirmation, Stephen - i will gladly follow your suggestion!

Sebastian

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.
February 4, 2021

Hi @Sebastian Krzyzanowski  -- Welcome to the Atlassian Community!

Some words of warning here...

The rule components in Branches execute asynchronously and independently.  That means there is no guarantee the first branch in your rule will finish before the second one starts.

For your rule, that could be a problem because you are using a not-equal test on status of Ready for Review...which could lead to processing some issues in both branches.

The generic fix for this situation is to ensure the selection processing of both branches is mutually exclusive.  For your rule, please consider switching the branch order and editing the rule a bit, such as:

  • Trigger: Sprint completed
  • Branch: For issues in sprint
    • Condition: Issue fields condition - Status = Ready for Review
    • Action: Transition issue - Ready for LAK-Testing
  • Branch: For issues in sprint
    • Condition: Issue fields condition - Issue Type = Story, Change
    • Condition: Issue fields condition - Status NOT IN (Ready for Review, Ready for LAK-Testing)
    • Action: Transition issue - Ready for Planning


Best regards,

Bill

Like # people like this
Sebastian Krzyzanowski February 8, 2021

Hi Bill - thanks a lot for the insightfull clarification! I will adjust my rule and keep it in mind for others still to come.

Sebastian

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events