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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Automation - parent inherits status by its least progressed subtask

Edited

I would like to set up an automation that checks the statuses of parent's subtasks and updates the parent task status accordingly. However, I don't need just a copy/paste of the status of one specific subtask but rather the status of the least progressed subtask.

Now I know that the Workflow varies by each organization and that it's not really linear, so within the automation, I need to specify based on which condition it should inherit the status.

Let's establish 4 different statuses:

  1. Backlog
  2. Todo
  3. In progress
  4. Done

The trigger most likely would be a subtask status change.

What happens next is the part I don't know how to do.

What I need to happen when any subtask changes its status is to validate all other subtasks to see, if I should trigger the parent change. Not only that, but I need to make it linear.

You can imagine something like:

  1. Are there any subtasks with status Backlog?
    1. if yes, set the parent status to Backlog and stop the automation
    2. if no, continue with the next condition
  2. Are there any subtasks with status Todo?
    1. if yes, set the parent status to Todo and stop the automation
    2. if no, continue with the next condition
  3. Are there any subtasks with status In Progress?
    1. if yes, set the parent status to In Progress and stop the automation
    2. if no, continue with the next condition
  4. Are there any subtasks with the status Done?
    1. if yes, set the parent status to Done and stop the automation
    2. if no, continue with the next condition

Any idea, how to achieve this?

1 answer

1 vote
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.
Oct 04, 2023 • edited

Hi @david_kubac 

Am I correct that you have a typo on 2.1, 3.1, and 4.1 that they should read "Todo", "In Progress", and "Done" respectively instead of "Backlog"?

If so, your rule could work like this:

  • TRIGGER: Issue Transitioned
  • CONDITION: Issue Type = Sub-Task
  • CONDITION (IF - JQL Any Match)
    • Parent = {{issue.parent}} AND status = Backlog
    • BRANCH (Parent)
      • CONDITION: Status != Backlog
      • ACTION: Transition Issue (To Backlog)
  • CONDITION (ELSE - JQL Any Match)
    • Parent = {{issue.parent}} AND status = Todo
    • BRANCH (Parent)
      • CONDITION: Status != ToDo
      • ACTION: Transition Issue (To Todo)
  • CONDITION (ELSE - JQL Any Match)
    • Parent = {{issue.parent}} AND status = "In Progress"
    • BRANCH (Parent)
      • CONDITION: Status != In Progress
      • ACTION: Transition Issue (To In Progress)
  • CONDITION (IF - JQL All Match)
    • Parent = {{issue.parent}} AND status = Done
    • BRANCH (Parent)
      • CONDITION: Status != Done
      • ACTION: Transition Issue (To Done)

Thank you, I fixed the typo. Your solution looks sound! I will give it a go :)

@Mark Segall I did a test and it doesn't work as expected, unfortunately.

What happens is that the parent inherits the subtask's status regardless of other subtasks.

As soon as I progress 1 subtask from Backlog to To do, the parent changes to To do.

What I need though is to keep the parent in Backlog until all subtasks are in To do.

See my video.

The expected result after the action I have done is that the Parent task will stay in status Backlog, instead, it transitions to To do.

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.
Oct 10, 2023 • edited

Ahh sorry about that.  I think we need to flip the script on this one:

  • TRIGGER: Issue Transitioned
  • CONDITION Issue Type = Sub-Task
  • ACTION: Lookup Issues
    • parent = {{issue.parent}}
  • IF CONDITION (Advanced)
    • {{lookupIssues.status.name}}
      Contains
      Backlog
    • BRANCH: (Parent)
      • CONDITION: Status != Backlog
      • ACTION: Transition Issue (To Backlog)
  • ELSE CONDITION (Advanced)
    • {{lookupIssues.status.name}}
      Contains
      ToDo
    • {{lookupIssues.status.name}}
      Does Not Contain
      Backlog
    • BRANCH: (Parent)
      • CONDITION: Status != ToDo
      • ACTION: Transition Issue (To ToDo)
  • ELSE CONDITION (Advanced)
    • {{lookupIssues.status.name}}
      Contains
      In Progress
    • {{lookupIssues.status.name}}
      Does Not Contain
      ToDo
    • BRANCH: (Parent)
      • CONDITION: Status != In Progress
      • ACTION: Transition Issue (To In Progress)
  • ELSE CONDITION (Advanced)
    • {{lookupIssues.status.name}}
      Contains
      Done
    • {{lookupIssues.status.name}}
      Does Not Contain
      In Progress
    • BRANCH: (Parent)
      • CONDITION: Status != Done
      • ACTION: Transition Issue (To Done)

I tested this in my test instance and it seemed to work.

Like abelalia87 likes this

Hi @Mark Segall

could you also add a screenshot of this automation? Trying to replicate it but I dont see options "Contain, Does not contain" etc when I select IF block condition with advanced compare condition  

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.
Oct 11, 2023

Hi @Pavel Kovařík 

What version of Jira are you using: Cloud, Server, or Data Center?  And if using Jira Server, what version of automation rules do you have: Lite (free), or Pro (paid)?

The different versions of automation rules have different capabilities.  For example, the Advanced Compare Condition is not available for the Lite version of Jira Server automation rules.

Kind regards,
Bill

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.
Oct 13, 2023

Sorry for the delayed response.  If you're on cloud as this question is tagged, you should have the option.  Here's a snippet of the rule I created in my test environment:

2023-10-13_11-16-08.png

Suggest an answer

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

Atlassian Community Events