Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Filter in Jira

Sharath Moolya July 9, 2022

Hello,

My requirement is how to use the correct filter to get the desired results

What i m looking here is
1) I have a EPIC ticket - Ticket no - S4567
2) Under EPIC ticket , i have Task - Ticket no - S4568
3) Under Task , i have Various subtasks

Currently i m using below filter but it is not showing me any tickets below subtasks

project = "SProduct" AND "Epic Link" = S4567 AND issuetype = Task AND key = S4568 AND type = Sub-task

Can you please help to define the correct filter which shows all Subtasks, under Task and task under EPIC LINK

Once the result is known , then i want display the filter result in Dashboard.
Is it possible to define in dashboard as per below
It should show EPIC ticket - Ticket no - S4567 and when click on EPIC ticket , it should show Task - Ticket no - S4568 and when click on task it displays all subtasks for eg like below


S4567(EPIC)

       S4568 (TASK)

              S789( SUBTASK)
              S779 ( SUBTASK)
              S754 ( SUBTASK)
              S777 ( SUBTASK)
               S875 ( SUBTASK)

3 answers

1 vote
Danno
Community Champion
July 9, 2022

Good day @Sharath Moolya

Yes, you can do this via JQL. You need to study up on JQL to really be able to use it effectively. The search is performed left to right. The idea is to collect the largest group of issues first.

Think about that like this. The first thing you want to do is to get the project you have and all of its issues. HEnce your filter should start with project = or in.

project = "SProduct" will get you all the tickets. My personal preference is to collect all the Epics I want next. You were thinking correctly with Epic link but what that does is get you just the epic you want and you have now eliminated all of the tasks, stories, subtasks, etc.

Again, my personal preference is to use parentEpic to narrow down the Epics you want again using = or in.

project = "SProduct" AND parentEpic = S4567 AND issuetype = Task AND key = S4568 AND type = Sub-task

You almost had it correct with issuetype = Task but all you would get is the tasks that have the issue key S4568. See below to fix this:

project = "SProduct" AND parentEpic = S4567 AND issuetype in (Task, Sub-task) Order by <whatever>

Note that using my filter structure will get you all of the issues under the Epic. IF you want the Epic to be in the list as well then add Epic to the list to have it show up.

project = "SProduct" AND parentEpic = S4567 AND issuetype in (Epic, Task, Sub-task) Order by <whatever>

Hope this helps.

Danno
Community Champion
July 9, 2022

@Sharath MoolyaOMT. I forgot to tlak about the dashboard. Use the filter widget and the filter you created to get your issues and you'll have them on a dashboard.

1 vote
Florian Bonniec
Community Champion
July 9, 2022

Hi,

 

You cannot do it with Jira but you can do it using an app.

 

Scriptrunner is one of them.

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_issuesinepics

 

Maybe you can also do it with another app JQL tricks 

 

I recommend you to test both or more on a test environment before choosing one and check if you do not have one of the app already.

 

Regarding the way you want to display it, if you want to be able to collapse each level I will go with an app also, Structure for Jira or Advanced Roadmap (this last one may be included if you have a DC instance)

 

If you decide to go with scriptrunner and don't mind about the collapse thing but only want to order them, you can create a script field that return the hierarchy such as Epic1/task1/subtask then order on this field.

1 vote
Mayur Jadhav
Community Champion
July 9, 2022

Hi @Sharath Moolya ,

Hope you are doing well!!

I don't thinks this is possible in Jira out of the box. But It is possible to achieve this through third party plugins from Atlassian Market places.

Plugin name: JQL Booster Pack

for example:  All together (Epic, Task & Subtask)

key = EMEA-2459 OR "Epic Link" = EMEA-2459 OR issue IN subtasksOf(' "Epic Link" = EMEA-2459 ')

 

Please have a look at the thread to have better understanding: JQL to show all issues and subtasks in an epic.

 

 

Cheers,
Mayur

Suggest an answer

Log in or Sign up to answer