How can I query for all subtasks of a set of issues returned from a particular set of issues?

Rob Horan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2024

I need to create a query that finds a set of issues based on certain criteria and returns those issues AND all subtasks.

Assume this is the primary JQL:

status in (Open, Working, "ON HOLD") AND resolution = Unresolved AND "User Field" = "my-user"

That will get me all of the parent tickets I'm interested in.  I need to get all the subs of those AND the parents.

DC, not Cloud.

I believe this instance has ScriptRunner, but I am FAR from a power user of SR.

1 answer

4 votes
Trudy Claspill
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 10, 2024

Hello @Rob Horan 

If you have ScriptRunner then you can use

(<your query for the parent issues>) or issuefunction in subtasksOf(subquery)

...where subquery is also the query you use to get the parent issues.

Refer to


Suggest an answer

Log in or Sign up to answer