Change status of Subtasks when the status of the parent Story is changed

Dan Maxwell May 14, 2020

We have a status in our workflow of "Withdrawn", so I was wondering if there is any way to get the Subtasks of a Story to change to "Withdrawn" when the parent Story is put to that status within post functions or something else? Another detail may be that if the aforementioned is possible, could we also only transition only the Subtasks that are not already marked "Done"?

 

Thanks for your help!

4 answers

3 accepted

5 votes
Answer accepted
Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 14, 2020

Hi @Dan Maxwell ,

while this isn's possible in Jira out of the box, there is a huge category of workflow apps on the Atlassian Marketplace adding this kind of functionality (see https://marketplace.atlassian.com/search?category=Workflow), e.g.

  • Jira Misc Workflow Extensions (JMWE), JSU Automation Suite for Jira Workflows and Jira Workflow Toolbox - all of them providing graphical interfaces
  • ScriptRunner - which might be a good fit if you're into groovy scripting

While all of the above can help you with your scenario, I have the specific use case at hand for Jira Workflow Toolbox (JWT), since I belong to the vendor: https://apps.decadis.net/display/AUTOMATION/Keep+the+status+of+parents+and+sub-tasks+in+sync

Have fun exploring the world of workflow apps!

Cheers
Thorsten

2 votes
Answer accepted
Benjamin Weber -Beecom- May 15, 2020

Hi,  Dan.

JSU can solve this without any coding necessary.

To your question: “Another detail may be that if the aforementioned is possible, could we also only transition only the Subtasks that are not already marked “Done”?

You may use the power of JSU’s JQL to solve this:Related issue by JQL:
parent = {issue.key} and status != Done

Check-out JSU’s documentation here:
https://confluence-apps.beecom.ch/display/JSU/JQL+ReferenceIf you don’t have JSU yet, you may download it from here: https://marketplace.atlassian.com/apps/5048/jsu-automation-suite-for-jira-workflows?hosting=cloud&tab=overview

Hope this helps!

Agree with this answer! JSU will let you do this without tedious coding. 

Like Partibha Rani likes this
0 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2020

Since JWT and JSU already chimed in, I can add that, with JMWE, you would be using the "Transition Related Issues" post-function, which is also very simple to configure. And to only transition sub-tasks that are not marked as done, it really depends on what you mean by "marked as done". Is it a particular status? In that case, you just need to make sure there is not transition from "Done" to "Withdrawn". Or you could use conditional execution with this condition:

relatedIssue.get("status").name == "Done"
0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 15, 2021

You could also use the jira automation plugin.

  • Here is a video tutorial. Take a look at the second rule. Instead of editing fields you can transition all subtasks to a new status: https://youtu.be/DcPYrw-Puus

Regards 

Suggest an answer

Log in or Sign up to answer