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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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?

14 answers

1 accepted

24 votes
Answer accepted

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 # people like 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

Like Kevin Kelly likes this

Doesn't work for me.

Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 02, 2018

Did work for me either

Is there any way of using the query in scriptrunner but to return all issues rather than just subtasks?

Like Jenn Rakestraw likes this

Hello this is a very old thread but I have found a solution to the problem. (As I was searching for a way to do this)

What this solves: Filtering subtasks of a selected parent without the need for a plugin.

project = "YOUR PROJECT" AND issuetype=Sub-Task AND issueFunction in subtasksOf("key=JIRA TICKET ID")

Like Tâm_Lê likes this

I almost got excited.

But you are using the plugin ScriptRunner for the issueFunction

Like # people like this

Need to do exactly what Andrew says but we are not allowed to use Scriptrunner - any ideas?

You do not require any Plugin, atleast not for JIRA cloud. Go to the filter screen and switch to Advanced, you can type in below query and get all the relevant Sub-Tasks. Do note the double quotes inside the 'subTasksOf' function is mandatory.


project = 'You Prj' and issueFunction in subtasksOf("status = Done")

issueFunction in subtasksOf("status = Done")

gettting below error while trying the above

Field 'issueFunction' does not exist or you do not have permission to view it.

Like # people like this

same for me

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 soloyes 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.

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

Like Daniel Hammer likes this

Works like a charm. Thanks!

Works. Thank you

This can be done with advanced query, something like below. This will give all 'Open' Subtasks for Parents whose status is 'Done'.
project = 'Your Project' AND status =Open AND issueFunction in subtasksOf("status = Done") ORDER BY status ASC

Field 'issueFunction' does not exist or you do not have permission to view it.

same for me

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

That didn't work for me but this did. Pulled up all the tasks, stories and subtasks in an EPIC. I've been looking for this answer for months!!!

parentEpic = dev-1422

Like # people like this

parentEpic does the trick!

I am using v8.5.9 and get the following when I try to use parentEpic..

"Field 'parentEpic' does not exist or you do not have permission to view it."

No idea if this is a versioning issue, or if my company admins have locked that field down...  I am admin of my project in Jira, but we have company level Jira administrators too

If you happened to filter for Issues under an Epic, and you have subtasks/defects under your Issues, you can use parentEpic

In my case, issue AB-1234 is the Id of the Epic under which all issues and their subs are hierarchically organized


project = AB AND "Epic Link" = AB-1234 OR parentEpic = AB-1234 ORDER BY Rank ASC

Then all issues of the EPIC and all their subtasks show and can be displayed using Swim-lines

Note that the subs do not have to have the EPIC identified as they take it from the parentEpic

Thank you !!!! I've been looking for help with this for a while and this query finally worked for me!

Like Francisco Correa likes this

Hi Francisco,

Is there any way to modify the query so it would return all issues under all Epics that are in certain project (not the project of issues, but of Epics).

Something like:
"Epic Link" contains "AB-"

We have Epics that are cross-projects (if that's a good practice is a valid question, but not now please :) ).


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"

LOL - WHY do everybody keep using "hardcoded" issue keys (like KEY-1234). You should never use "hardcoded" keys! Period! :D

So did someone actually find a solution for Jira Cloud in this matter?
(where we DONT need to update issue keys manually)

Sorry - but this isn't the only thread I've seen "people trying to help, but who doesnt".


Kind regards


parentEpic has worked for some, but it doesn't work for me...

I am using v8.5.9 and get the following when I try to use parentEpic..

"Field 'parentEpic' does not exist or you do not have permission to view it."

No idea if this is a versioning issue, or if my company admins have locked that field down...  I am admin of my project in Jira, but we have company level Jira administrators too

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...

Why hasn't Atlassian implemented this feature yet?

I was trying to exclude all subtasks from a specific parent key and used the below query. Worked for me. 

assignee in (<jira usernames>) AND status not in (Closed, Done, Complete, Resolved, Cancelled) AND project not in (<give project names that you would like to exclude>) AND  parent != <which ever parent key you would like to exclude> 


This query removed all the subtasks for the parent key

linkedIssue in linkedIssues("ISS-111")

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

No longer free

Like Viet Cao Hoai likes this

Yes. No longer free

Suggest an answer

Log in or Sign up to answer