Searching for subtasks of parents that meet certain criteria

I have quite a bit of subtask cleanup that I need to do. I'd like to find all subtasks of Parent Issues that are in the closed state. I was hoping to do something along the lines of:

parent in (status = closed)

or even

parent in (filter = closedIssuesFilter)

Is something like this possible? What would be the best way to accomplish this?

8 answers

1 accepted

20 votes
Accepted answer

You can also use Script Runner plugin and a query like:

issueFunction in subtasksOf("project = XXX AND issuetype = Task AND status = Closed")

It is paid version. What the point.
We unable to create board with sub-issues (filtered by version, epic, component). When you click at issue, and looking into subtask, what you see? Hided by filter.

Atlassian knows and forcing us to pay more. I do not know why it still isn't in the box.
They sells product with several flaws, half-stuffed. I think they starving of good competition. 

Like 1 person likes this

Hey Kirill,


I have ScriptRunner version 3.1.4 installed, which is free. You can install it manually. I don't have the need for subtasks anymore, but if you find ScriptRunner useful I think that you should at least try it out.

Can anyone help? I am using the latest version of Script runner and when running the above JQL to search for sub tasks i get this error:


  • Error in scripted function: subtasksOf, see below
  • com.atlassian.jira.jql.parser.antlr.RuntimeRecognitionException

try using below :


issueFunction in subtasksOf("key = ABC-XX")


Where ABC-XX is your JIRA number

Doesn't work for me.

Did work for me either

There is no need for any Plugin..

Switch to "advance" filter option and enter

status in ("Open") AND parent in (PHX-xxx,ENG-xxx)

It will give you all the open tickets present as a subtask in parent JIRAS. Build more complex and enjoy using JIRA. Advance filter options will also give you all possible values to build Queries.

Please comment if its helpful.


Hassan Saleem

Quality Control Engineer

Wellogic. U.A.E

Hassan, I'm trying your solution but I'm getting error "The issue key 'CP' for field 'parent' is invalid." CP is our project key. What am I doing wrong?

Like 1 person likes this

Not really good suggestion as a filter like this would work only at one point in time. I need "search for parents with condition" for my Agile board.

Jennifer, are you using the full issue number in 'parent'? It has to be CP-1234 (or whatever)

Yep using the full issue name including number. I still have not found a way to do this without a plugin (we still don't have one that would help with this).

Odd. We don't have any plugins, either, and I was able to do it just this morning. What version of JIRA are you using? What's the exact query?

Wait, I was mixing up my questions, sorry!! For this one, I wanted to be able to search for all closed issues that have open subtasks in a specific project.

Exactly, I needed to search for subtasks when I don't know how many parents I have, but I know their condition. I cannot use full issue key here "CP-12345". I resorted to Script Runner in the end.

Any solution for OnDemand where we can't install arbitrary plugins?

It would absolutely fantastic if this was supported in the basic query editor.  Basic queries are substantially easier to compose than advanced queries, and there's already a metaphor for searching based on an issue in the epic link field.

RituM I'm New Here Sep 14, 2018

Hassan, the solution you're offering will not work if I only want to include subtasks of a issues from a query.

Would really like to be able to query for all issues and their sub-tasks in (for instance) an Epic.

All the answers here require either multiple manual step, hard coded Issue ID's or a plugin. Can't use the suggested plugin in Cloud Jira.

It is surprising and disappointing that something this basic is hard or impossible in the JIRA query language

I don't know whether it's still relevant, but we had same problem and it was solved with help of following plugins:

- Query Issue Custom Field delivers validators, that can be checked also for status etc.

- AM Utils delivers opportunities search for parents/subtask and create JQL inside another one, like

  • issue in issueParents("project = AAA")
  • issue in issueSubtasks("project = AAA")

Maybe it can help

AM Utils great, but outdated

I had the following request:Is there a way to search for subtasks of change requests?

Here is the JQL for that:

issueFunction in subtasksOf(" issuetype = 'Change Request' ")  AND category =

"Client Service Desk Projects"

Issue nav.

- > Configure Columns

-> add subtasks

Copy all. subtasks

Paste in advanced search

key in (Sub-1, Sub2...)


But maybe u can start by selecting done issues and see subtask...

That's only available if you are using Jira Server.  What can be used with the Web version?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

558 views 0 12
Read article

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