Forums

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

How can I exclude stories that are included in an Epic in the advance search?

Inmaculada Paya November 9, 2022

I am trying to create a search filter so that I can identify all the task included in the current sprint that doesn't belong to a specific Epic.

I tried the following:

  • Project = BOX and Sprint = "Sprint50" and "Epic Link" != BOX-32
  • Project = BOX and Sprint = "Sprint50" and "Epic Name" != UIT

 

When I try Project = BOX and Sprint = "Sprint50" I obtain a list with 10 tasks (story, bug, and technical story). 1 of them is included in the Epic with Link BOX-32. I would like to have a jql that allows me to exclude any task included in the mentioned Epic so that the list contains only 9 task.

Is that even possible?

 

I would also exclude tickets that belong to an epic on a different project, something like:

  • Project = BOX and Sprint = "Sprint50" and "Epic Link" != RD-32
  • Project = BOX and Sprint = "Sprint50" and "Epic Name" != "RD Full"

Is that possible?

3 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
November 9, 2022

Are the 9 other issues that you want to include associated with any Epic?

In addition to what @Mark Segall and @Nic Brough -Adaptavist-  have said, if you need to retrieve issues that are not associated to an Epic you need to modify your filter thus:

Project = BOX and Sprint = "Sprint50" and ("Epic Link" != BOX-32 or "Epic Link" is Empty)

When you use the != operator to exclude issues that have a certain value, that will only include issues where that field has a value in it to be used in the comparison. If the field might not have any value, and you want to include those issues where the field is blank, then you have to include the or <field> is EMPTY clause to get those issues.

Inmaculada Paya November 9, 2022

Thanks, it worked !!

Answering your question, some tasks did have value for the Epic link field and some others didn't.

0 votes
Mark Segall
Community Champion
November 9, 2022

Hi @Inmaculada Paya and welcome to the community!

Can you confirm whether your project is company managed or team managed?  If company managed, this query should work...

Project = BOX and Sprint = "Sprint50" and "Epic Link" != BOX-32

For a Team Managed project, you'll want to use this:

Project = BOX and Sprint = "Sprint50" and Parent != BOX-32
Inmaculada Paya November 9, 2022

It is team managed

Project = BOX and Sprint = "Sprint50" and Parent != BOX-32

 This doesn't work but

Project = BOX and Sprint = "Sprint50" and ("Epic Link" != BOX-32 or "Epic Link" is Empty)

THis one worked just perfectly. Thanks for your help.

0 votes
Nic Brough -Adaptavist-
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.
November 9, 2022

Welcome to the Atlassian Community!

Your very first bit of JQL works perfectly for me (albeit with slight differences in data).  Until I start adding sub-tasks. 

Issues of a sub-task type only belong to an Epic by virtue of being part of an issue that belongs to an Epic.  They do not have their own Epic link.

I suspect your "technical story" is a sub-task type, so "epic link != BD-31" will not exclude them.

There's no way in standard JQL to look at the Epic link of their parents, not that I've found, so I think we're a bit stuck here.  Maybe the best option is to simply exclude sub-task types (they're going to be part of the issues that are returned anyway)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events