close subtasks with closed parent

Is there a way i can close all sub-tasks that have a closed parent? 

3 answers

1 vote
Andy Nguyen Atlassian Team Apr 17, 2015

Hi Greg,

If you use Script Runner for JIRA Server, you can run the following JQL to search for all non-Closed subtasks of a specific issue (that you know is Closed):

issueFunction in subtasksOf("issuekey = DUMMY-1") AND status != Closed

In this example, I'm searching for all non-Closed subtasks of DUMMY-1. You can surely modify the query according to your real scenarios.

If you'd like to look for all non-Closed subtasks of all Closed issues, you can use this:

issueFunction in linkedIssuesOf("status = Closed", jira_subtask_outward) AND status != Closed

Then you can use Bulk Change to close all of them.


Andy Nguyen Atlassian Team Apr 17, 2015

Just for your info, here's the list of Scripted JQL Functions by Script Runner:

I am not looking to close sub-tasks on parent task closure. I am looking to close sub-tasks that have a parent already in a closed state. 

I believe based on the first post-function example, you can write your own Groovy script. You just have to query all the issues you need and loop through them as you see in the example. Here is how to execute a JQL query:

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

809 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you