Jira automation - Parent Issue with open sub-tasks AND resolution as Done

Troy May 12, 2024

Hi, hope everyone doing well. I am looking for some help with my below Jira automation rule - please refer attached image.

I want this rule to be triggered only when the parent issue is marked as Done with Resolution as Done. But at the moment even with resolution selected as Won't do or Duplicate, the rule is getting triggered, it is not respecting the condition I have given as if: parent matches status = Done AND resolution in (Done). Any guidance please what is that I am missing here?

image.png

1 answer

1 accepted

1 vote
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.
May 12, 2024

Hi @Troy 

The trigger controls when a rule starts and conditions limit the continuation of steps.

As your rule is written, and assuming it is a single-project scoped rule, it will:

  • trigger when any issue transitions to Done (from any previous status)
  • check if the Parent issue of the trigger issue has a status = Done and a Resolution = Done; if not, or there is no Parent issue, processing stops
  • check if the trigger issue has any subtasks not in a status of Done; if not, or there are no subtasks, processing stops
  • transition the trigger issue to "In Progress" from "Done"

Does this match the scenario you want?  If not, please describe the problem you are trying to solve; that extra context may help the community to offer better suggestions.

Kind regards,
Bill

Troy May 12, 2024

Thanks for your response @Bill Sheboy 

Yes, you got that right, so basically say I have an issue type = Story (can be Epic, Initiative etc.) and that parent issue has some subtasks, when I mark the parent issue as status= Done with resolution = Done, the rule will check for existence of any linked subtasks that are NOT in Done status and if found it will move back the parent issue to 'In Progress' from Done.

The rule is working fine however even in the instance when resolution is selected as Won't do or Duplicate while marking parent issue as Done it is coming into play and moving back the parent issue to 'In Progress' which is what I don't want.

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.
May 12, 2024

I'm a bit confused by what you describe...

First, Epics and Initiatives do not have subtasks; subtasks are a part of a standard issue type, such as Story, Task, or Bug, as a child item.

Next, if you want the rule to start when something happens to the parent issue, your conditions seem incorrect.  Perhaps this is what you are describing:

  • trigger: issue transitioned to Done
  • condition: resolution equals Done
  • condition: issue type is one of Story, Task, Bug
  • related issues condition: there are subtasks
  • related issues condition: some subtasks are not Done
  • action: transition the trigger issue back to "In Progress"

 

If you need a similar rule for "when an Epic transitions to Done, check its child issues...", you could either use multiple rules or use an if / else condition on the issue type for each section:

  • if / else condition
    • if issue type is Story, Task, or Bug
    • ...check the subtasks...
  • else / if condition
    • if issue type is Epic
    • ...check the child issues with the same Epic parent...
  • ...

 

Like Troy likes this
Troy May 13, 2024

Sorry about the confusion Bill :(

The requirement was only for issue type= Story/Task/Bug and thanks for the helpful pointers, I was able to achieve that via below workflow

image.png

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events