Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation help - transition issue based on child issue

dave_drexler
Contributor
June 21, 2023 edited

Hi folks - I have a project with 3 issue types (Theme, Initiative, and Sub-initiative) that we use for Advanced Roadmapping. Sub-initiatives are implemented via Epics in various other projects, with the Epics linked to the Sub-initiative via the Child-of link type. I want to

  • Transition a Sub-initiative when one (the first) of its 'child' Epics are added to a sprint. 
  • Transition a Sub-initiative when one (the first) of its 'child' Epics are transitioned; for example, move the Sub-initiative to In Progress when the first of its children are moved to In Progress.
  • Transition a Sub-initiative when ALL (the last) of its 'child' Epics are transitioned. In other words, when the last child Epic is closed, close the Sub-initiative.

I found examples of doing these things based on Epics and Sub-tasks, but not linked 'child' issues. Is this do-able?

2 answers

1 accepted

3 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2023

Hi @dave_drexler - This is totally doable.  You're looking at a few automation rules:

Transition a Sub-initiative when any of its 'child' Epics are added to a sprint.

  • TRIGGER: Field Value Changed (Sprint)
  • CONDITION: Issue Type = Epic
  • CONDITION: JQL
    Here we'll have it verify the parent link isn't already in the desired status 
    • Key = {{issue.Parent Link}} AND status != X
  • BRANCH (JQL):
    • Key = {{issue.Parent Link}}
    • ACTION: Transition Issue (To status X)

Transition a Sub-initiative when any of its 'child' Epics are transitioned.

This one will be similar to above with exception of the trigger

  • TRIGGER: Issue transitioned (to X)
  • CONDITION: Issue Type = Epic
  • CONDITION: JQL
    Here we'll have it verify the parent link isn't already in the desired status 
    • Key = {{issue.Parent Link}} AND status != X
  • BRANCH (JQL):
    • Key = {{issue.Parent Link}}
    • ACTION: Transition Issue (To status X)

Transition a Sub-initiative when ALL of its 'child' Epics are transitioned.

This one is a little different

  • TRIGGER: Issue transitioned (to X)
  • CONDITION: Issue Type = Epic
  • ACTION: Lookup Issues
    Here we want a "negative" result where we're looking for any issues that don't meet your "ALL" condition
    • "Parent Link" = {{issue.Parent Link}} AND status != X
  • CONDITION (Advanced)
    • {{lookupIssues.size}}
      Less than
      1
  • BRANCH (JQL):
    • Key = {{issue.Parent Link}}
    • ACTION: Transition Issue (To status X)
dave_drexler
Contributor
June 21, 2023

Thanks, @Mark Segall! I'll give this a whirl.

Like • Mark Segall likes this
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.
June 21, 2023

Hi @dave_drexler 

Yes, and...to Mark's answer:

Please consider your edge cases/exceptions to decide what you want to happen, and to confirm the rules can either handle them and/or have no side effects.

For example, you want to transition a "sub-initiative" when its first, child epic is assigned to a sprint.  What happens when assignment was done in error, or the sprint field is later cleared?

Some cases might be addressed by improving your scenarios (e.g., only transition after the sprint starts versus on assignment), while others may potentially need some form of cleanup.

Kind regards,
Bill

Like • 2 people like this
dave_drexler
Contributor
June 22, 2023

Thank you, @Bill Sheboy - understood; that makes sense. I appreciate the advice.

Like • Bill Sheboy likes this
0 votes
dave_drexler
Contributor
July 24, 2023

@Mark Segall  - wondering if I can prevail on you for more advice. I tried the 'middle' automation, above, first, but it's not firing. There's no indication in the audit log that it ran even though my colleagues tested it with the correct conditions. (I confirmed their test conditions.)  Can you spot what I'm doing wrong? Here's how I set it up:

Automation.png

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.
July 25, 2023

Hi @dave_drexler 

When one rule performs actions that could trigger another, the next / downstream rule needs to enable the option in the details for "Allow rule trigger".  This is disabled by default to prevent accidental rule looping/firing.

Kind regards,
Bill

Like • dave_drexler likes this
dave_drexler
Contributor
July 25, 2023

Thank you, @Bill Sheboy. I've made that change and asked my colleagues to test.

Like • Bill Sheboy likes this
dave_drexler
Contributor
July 26, 2023

Hi @Mark Segall and @Bill Sheboy - sorry for being such an automation dope, but this seemingly simple rule is still not running, though I think I'm getting closer.

Here's what I have:

Automation2.png

As you can see, my test child issue (PLATFORM-2084) passes the conditions, but then there are 'No Actions Performed' on the parent issue. I've simplified the rule from what @Mark Segall originally suggested; I read somewhere that {issue.parent link} was being deprecated and replaced with the Parent condition, so I tried that.

Any clues appreciated; sorry again for not having one.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 26, 2023

Hi Dave - I see two issues

1. Your second condition is based upon Parent which is only applicable to Sub-Tasks.  Instead you'll want to replace it with this:

  • CONDITION (JQL)
    • key = {{issue.Parent Link}} and status = "Approved for Development"

2. Your branch is also based upon parent which again is only applicable to Sub-Tasks.  Instead you'll want this:

  • BRANCH (JQL)
    • key = {{issue.Parent Link}}
Like • 2 people like this
dave_drexler
Contributor
July 26, 2023

Thanks, @Mark Segall ! That worked a treat. That's what you originally laid out, but I drifted away from it as I stumbled about. Anyway - thank you for the answer and your patience. Now I'm on to the other two rules.

Like • 2 people like this

Suggest an answer

Log in or Sign up to answer