Update parent issue when all subtasks are moved

Emerson
Contributor
October 10, 2022

Hi everyone!

Creating an automation to synchronize status is very easy. The problem is, when you move the first subtask, the parent item also moves along. And I want it to only move when the last subtask changes status. Help me, please!

2 answers

1 accepted

5 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.
October 10, 2022

Hi @Emerson - You'll want your rule to look something like this:

  • TRIGGER: Issue Transitioned
  • BRANCH (Parent)
    • CONDITION: All subtasks match the following JQL
      • status = Done
    • ACTION: Transition Issue
Emerson
Contributor
October 11, 2022

Hi @Mark Segall - In "status = Done" I want to change to "status != Parent Item Status". How do I represent this in JQL?

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.
October 11, 2022

To clarify, are you saying you want the condition to check for when all child statuses no longer equal the same status as the parent?  If so, it would be something like this:

status != {{issue.parent.status}}

Emerson
Contributor
October 11, 2022

It worked when I changed to "Delivered". When I changed from "To Do" to "Doing" the parent has not changed.

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.
October 11, 2022

Are you getting any errors or it's simply not passing the condition?

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2022

Could you include a screenshot of the rule configuration so far?

Emerson
Contributor
October 11, 2022

That's the rule so far. I'm not sure if it's right, but works when I move the subtask to "Done".

Captura de tela 2022-10-11 220610.png

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.
October 12, 2022

It looks like your last step is "Same Status (loop)".  You should change it to Copy From Trigger Issue

Emerson
Contributor
October 13, 2022

I changed it to Copy From Trigger Issue and when I moved the subtasks from "To Do" to "Doing", the parent item didn't move along.

He only equaled the status when he went to "Done".

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.
October 13, 2022

I think I see the issue.  It's your condition.  You should not be using parent status.  You're already branched into the parent so it won't have a parent and thus, the status is failing to pull anything in.  The condition needs to be this:

status = {{issue.status}}

where {{issue}} = the parent issue because you're branched into it.

Make sense?

Emerson
Contributor
October 13, 2022

IT WORKED! Man, you're awesome and a genius!

Thanks a million!

Like # people like this
0 votes
Thomas Evans
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2024

Hi there, I followed the above and it's working great, however, say for example I have 10 sub-task, I only want them to change the main parent card's status once all of them are the same. Is this possible, if so how? 

Currently, when I change 1 status the whole card moves? 

Suggest an answer

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

Atlassian Community Events