Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to include subtasks of a given Epic in Filter

I'm using Quick Filter to filter my tasks based on Epic. Here is the JQL I have for one of my queries


     "Epic Link" ="Product"


so it filters all the tasks/issues belonging to Product Epic. However as I can't assign a sub-task to an Epic, this filter does not show subtasks of my tasks (where the task belongs to Product epic). How can I change my JQL to include those subtasks too?

2 answers

Very late reply, but as I was facing the same issue I was looking for an answer too!
But I found a solution without the need of any additional Jira add-ons.

So if you want to have all stories & the sub-tasks of these stories in one JQL filter, you have to refer in your JQL filter to a structure.

So first create your structure e.g. "STRUCTURE_X"
In your structure you use as JQL query to insert all stories linked to that epic:
issue in linkedIssues("epic-1234") or ("Epic Link" = epic-1234)

Now you have a structure with all the stories linked to the epic.
What is still missing are the "subtasks"
So in your structure, you add -> Extend > Subtasks...

Now you have a structure with all stories and all subtasks connected to these stories.
So the structure results in Epic > Story > Subtasks


Now you go back to your quick filter:
and add the following JQL query: issue in structure("STRUCTURE_X")

=> That's how I was able to solve it on my end.. Hope it helps..

0 votes
Sudarshan Community Leader Feb 05, 2021

Hello @Hessam Zakerzadeh 

The level is as below:
Epic --> Story/Bug --> Sub-task

so if you want to connect a sub task to an epic it may not work.

However if you want a quick filter to find all the items related to an epic try this:
project = <name> AND issueFunction in issuesInEpics("issuekey = <your epic number>")


to get the full hierarchy you can check a Jira app called Structures

I tried this JQL but didn't help with subtasks!

Sudarshan Community Leader Feb 05, 2021

ahh yes :( 
this JQL will not result in sub-task, because you are asking to show the issues in Epic, which will give all the stories (its one to one), whereas the sub task are the story's children.

and if you are trying to connect a subtask to an epic -- this will not work
Here is a quick read about Epic in jira

Note: JQL is just query language (basic search), it just helps you find direct answers in your jira DB, it can operate on the logic gates, but it cannot calculate and loop. 

try Structures which will help you with more ideas and visibility.

My goal is not to connect a sub-task to an Epic.


My goal is to show sub-tasks when I filter my Task in my Board.

Sudarshan Community Leader Feb 07, 2021

Alright if you want to see the sub task assigned to you
use the quick filter named - "only my issues" - this is default quick filter when a new board is created (unless your admin has remove it)
assignee = currentUser()

JQL will give you a first level result (flat)
so you can try these things:
1. - find your epic and see the stories in it.

2. find a story and see the subtask under it.

3. find out all the items in your name (with issuetype = user story and sub task)

I'm filtering based on "Epic" name and need to see the tasks and sub-tasks.


So using "only my issues" filter not gonna help.

Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you