Forums

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

Help branching an automation rule

dave.drexler
Contributor
August 17, 2023

Hi folks - looking for some help designing a rule that is triggered by a change to the Sprint field on a Story, and then transitions the Story's Epic's parent.

We have a structure in which Epics in project-A roll up to parent Sub-initiatives in project-B.

I want to transition the Sub-initiative to 'In Progress' when any Story in any child Epic of the Sub-initiative is added to a sprint.

Here's what I have that's not working. I suspect the problem is with the final action which is probably trying to transition the Epic, not the Epic's parent. But because I can't add a branch under a branch (I think - the UI doesn't seem to allow it) I don't know how to point the action at the Epic's parent.

According to the log, the Lookup step is working and finding the correct parent Sub-initiative.

Any help would be appreciated!

 

Automation3.png

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
August 17, 2023

Hi @dave.drexler - Correct.  Your branch is currently on the Epic rather than the Sub-Initiative.  I would make the following adjustment to your rule:

  1. Add a variable after your first condition:
    • varEpic
    • {{issue.Epic Link}}
  2. Change your Branch to JQL
    1. Key = {{varEpic.Parent Link}} AND status != "In Progress"
  3. Remove the Lookup Issues and JQL condition within the branch

I think this will work.

dave.drexler
Contributor
August 17, 2023

Hi @Mark Segall - thanks. I definitely owe you a box of donuts.

I updated my rule per your advice, but it's giving me an error regarding the branching JQL. The error message seems to ignore the defined variable/smart value ("(Key = AND status != "In Progress")").  Says "Expecting either a value, list or function but got 'AND'", which doesn't make sense.

Automation4.png

 

I've defined that variable like so:

Automation5.png

Mark Segall
Community Champion
August 17, 2023

Wasn't sure if the variable approach would work.  Let's try this instead:

  • Replace the variable with a Lookup Issues Action
    • Key = {{issue.Epic Link}}
  • Then update the JQL in your branch to this:
    • Key = {{lookupIssues.Parent Link}} AND status != "In Progress"
dave.drexler
Contributor
August 18, 2023

Thanks, @Mark Segall ! That worked great.

Like Mark Segall likes this

Suggest an answer

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

Atlassian Community Events