Forums

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

How do I write a filter so it returns only items that contain two specific Labels?

Tracy Dobbs
Contributor
June 7, 2021

How do I write a filter so it returns only items that contain two specific Labels? 

Right now, I have my filter written and selected my two labels.  The results show me all Epics with either label on it.  I only want to see Epics that have both labels.  Seems simple, but I can't figure it out.

 

Thanks,

Tracy

3 answers

3 accepted

6 votes
Answer accepted
Tracy Dobbs
Contributor
June 7, 2021

I figured it out!  project = EXBA AND issuetype = Epic AND labels in (ccc_health_assessment) AND labels in (2021_h1_planned) ORDER BY cf[10009] DESC, cf[20963] DESC, created DESC

Jack Brickey
Community Champion
June 7, 2021

That looks strangely familiar!

3 votes
Answer accepted
Jack Brickey
Community Champion
June 7, 2021

try this….


Project = abc and labels = string1 and labels = string2

Jack Brickey
Community Champion
June 7, 2021

project = EXBA AND issuetype = Epic AND labels = ccc_health_assessment and labels = 2021_h1_planned ORDER BY cf[10009] DESC, cf[20963] DESC, created DESC

Jean Evelette
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2023

OK and how to "exclude" Epics / Stories having a dedicated label?  This doesn't work -> labels != toto or labels not in ("toto")

0 votes
Answer accepted
Dave Mathijs
Community Champion
June 7, 2021

Hi Tracy,

Can you share the JQL of the filter you've written?

Thanks,

Dave

Tracy Dobbs
Contributor
June 7, 2021

Hi Dave,

project = EXBA AND issuetype = Epic AND labels in (ccc_health_assessment, 2021_h1_planned) ORDER BY cf[10009] DESC, cf[20963] DESC, created DESC

Dave Mathijs
Community Champion
June 7, 2021

Jack has given you the correct answer below.

Suggest an answer

Log in or Sign up to answer