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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,798
Community Members
 
Community Events
177
Community Groups

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?

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

Hi to get An epic and all issues linked to this Epic (via the Epic Link) as well as all the subtask under the issues linked to the epic fry this filter:

 

Issuekey = EPICNUMBER-00 OR "Epic Link" = EPICNUMBER-00 OR issueFunction in subtasksOf("\"Epic Link\"=EPICNUMBER-00")

I'm guessing you never got an answer to this problem?  This seems like it would be a common request.  We have multiple teams working in the same Jira project.  The "mini project" stories are consolidated under an Epic.  This sub-team is focused on this mini project with a Kanban flow.  The product owner wants to visualize their workload using a separate Kanban board.  This most obvious solution is to create a new Kanban board that only shows issues under the Epic.  We just need to see the sub-tasks for the Stories as that is where the work is being captured.  So there is no solution outside of an external add-on?

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)

Like Katrin Heimann likes this

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.

Like Marnix van Bochove likes this

Suggest an answer

Log in or Sign up to answer