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!


JQL query for filtering all subtasks of specific tasks


Hi All,

EDITED: How do I modify the filter below to show only Subtasks & parent Epics of Tasks called "change management task" (tasks should not be visible, only epics & sub-tasks).

project = RRP AND issuetype= task AND text ~"change management task" ORDER BY Rank ASC



Log in or Sign up to comment

Hi There, I think you might need to use AND issuetype= Sub-task to return only the sub-tasks you are looking for, cheers 


I think you need something like this,

issue in subTaskOf("project = RRP AND issuetype= task AND text ~ \"change management task\" ") ORDER BY Rank ASC

 which is available with Scriptrunner!


Like Darryl Lee likes this

Sprictrunner is not an option unfortunately

Then it is unlikely you can achieve what you trying to filter. If you can identify the the keys for those tasks then you may use something like this,

project = RRP AND parent in (<issuekey1>,<issuekey2>,...) ORDER BY Rank ASC
Like Haddon Fisher likes this

@Cengiz Akyildiz is correct as far as I know that there is no JQL functions out-of-box that let you do this kind of 'nested' or relational querying. The feature request is JRACLOUD-21936 for anyone who wants to add their howls to the void.

However if you are willing to use a custom field and Automation, you could set a flag if\when the parent has "change management task" in the title and search for sub-tasks with the flag set. 

Like # people like this

If you list down your existing add-ons you have that might with, we can suggest some other solutions using your existing add-ons. As people suggested here automation can help you out to tag your subtasks. 

Possible methods for example:

  • If you have A4J, you can set a label, flag or any other type custom field for this, which you can search on that field
  • or If you have JMCF, you can create a calculated field similarly
  • or if you have Workflow add-ons (like JMWE, JWT,JSU), you might be able set a similar field within the workflow of subtasks.
  • you can also write a listener using (MyGroovy - free) to set again that custom field.

But those are all based on having a custom field that will be set through various automation tools listed here (there are more than you think actually)

But again the simplest way is to have a JQL function that provides you the set of sub-tasks given the nested criteria. Not necessarily SR4J, there might be some other cool add-ons, there are new add-ons coming up on the Marketplace, which you might be able use it for free. 

Like # people like this

Ooh nice I've just realized MyGroovy support scripted fields also. But you know Jira Server is sunsetting, you gotta test it in DC. 

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Dec 01, 2022

Oh wow I did not know about MyGroovy, but um, this was posted in Jira Cloud Admins, so might not be applicable? :-/

Ooh totally you are right, I forgot for a moment which environment is the issue for.

Hi, Check below if that helps!

#if you multiple parent task with similar summary
project = RRP AND issuetype = Sub-Task AND text ~ \"change management task\"

#if you have single parent task number 

project = RRP AND issuetype = Sub-Task AND "Parent Link for Task" = "issue-key" AND text ~ \"change management task\"

#if you have multiple parent task number 
project = RRP AND issuetype = Sub-Task AND "Parent Link for Task" in (issue-key, issue-key) AND text \"change management task\"

it doesn't like the statment project = RRP AND issuetype = Sub-Task AND text ~ \"change management task\"


Screenshot 2022-12-01 014646.png

Hi, it won't be working as you expect either way without some add on for extended JQL queries. In the basic jira query you can not filter subtasks of parent/s defined by another query.

Either You need some add on for it or you need to divide the query to two steps and manually change it always when you need it (not useful for dashboards with automatic updates). The first you need to find all the parent issue with the text - anotation is: text~"change management task", and it will find all the parent issues, you tak list of the found issue keys and make a second query with them in parenthesis: issuetype = Subtask AND parent in (PRP-1, PRP-2...)


Workaround could be use the automation to put labels to the subtasks and than make query based on subtasks issue type and the lable

Like # people like this

I think because you are escaping the quotations in your JQL it is taking /"change as a term and expecting another key word after it, try:

project = RRP AND issuetype = Sub-Task AND text ~"change management task"

thank you fot the suggestion, the query will not work because there are no sub-tasks called "change management task" 

Hi, Try this:
project = RRP AND issuetype= task AND parent in (issue-key) AND issuetype in (epics, sub-tasks)

replaced (issue-key) with the actual issue id, no issues were found to match the search

yes because this query makes itself never match - you want all issues that are at the same time type "task" and "epics or subtasks", so from that query delete <AND issuetype= task> and epics wont be found with this query, because it wont fit <parent in>, you need to divide search for subtasks and for epics with <OR>


(project = RRP AND parent in (issue-key) AND issuetype = sub-tasks) OR (project = RRP AND  parentEpic = (issue-key))

Like Kalin U likes this

What is the issue key and issue type for "change management task"?  I am assuming that the issue type is the parent of the subtasks that you are trying to query on.  


Try this:

project = PRP AND issuetype = "Sub-task" and "Parent Link" in (Issue Key)


where Issue Key is the parent issue of the "change management task"

It works on mine when I tried to pull the sub-tasks of a specific parent link or multiple as well.

AUG Leaders

Atlassian Community Events