Chaining multiple rules does not work

Antoine Claudé-Pénégry August 26, 2022

Hello there,

 

I am struggling understanding how to chain multiple automation rules.

Here my use case :

RULE 1 :

Capture d’écran 2022-08-26 160324.png

  • When an Epic is created, the rule 1 will create a serie of tasks with the EPIC as parent

SUBSENQUENT RULES :

  • I have a set of subsequent rules that assigns tickets, copying the component from the EPIC to the tasks and other things like that.
    Capture d’écran 2022-08-26 160532.png
  • All the subsequent rules have the "Allow rule trigger" checked
    Capture d’écran 2022-08-26 160515.png

First, you may asked : why subsequent rules and not having those in the 1st rule? That's because the fields on which these rules are based are not mandatory. Plus, it was way more flexible in case the value of on the fields that triggers changes afterwards.

The thing is : it doesn't work.

  • If the fields are updated after the epic creation, everything works fine!
  • If all the fields necessary for the subsequent rules are added as epic creation, the subsequent rules triggers alright but shows : "Branch rule / related issues, No related issues could be found.". So it seems that Rule 1 is indeed trigerring subsequent rules but to early in the process and the tasks haven't been created at that time.

 

Please HELP :) 

2 answers

0 votes
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 27, 2022

Hi @Antoine Claudé-Pénégry -- Welcome to the Atlassian Community!

If you want two rules to execute one after the other (i.e. you intend the first rule to complete before the second rule starts) try structuring the triggers to do that.

Your second rule is triggered on change to the Epic's assignee, which could certainly occur before the first rule completes.  In fact, the opposite could occur too, based on when the rules start!

I suggest pausing to:

  1. map out what problem you are trying to solve,
  2. decide the order of steps in your solution, and then
  3. build rules which will occur in that order.

One way to do step #3 is to identify the unique condition which confirms the order, such as adding a comment as a final step in the rule.  And, pay close attention if your rules contain any branches:

  • branches which can process one-and-only-one issue (e.g. on parent, last created issue, current issue, etc.) get run in-line
  • however branches which could process more than one issue (e.g. issues in Epic, JQL, etc.) run in parallel and asynchronously.  There is no guarantee they will finish before the next rule step, or even all the other rule steps.

Kind regards,
Bill

Antoine Claudé-Pénégry August 29, 2022

Thanks Bill. That's what I'll do.

Go back to process mapping and rethink the rules based on the expected outcomes!

Like Bill Sheboy likes this
0 votes
Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 26, 2022

Hi @Antoine Claudé-Pénégry ,

 

the issue might be because the first rule is executed in the background and does not finish before the next one starts. Have you tried adding the action "Re-fetch issue data" before the branch ? 

 

Let me know if this helps, 

 

--Alexis

Antoine Claudé-Pénégry August 26, 2022

It is probably that.

"Re-fetch issue data" is which rule? The first one and the subsequent ones?

Suggest an answer

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

Atlassian Community Events