Forums

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

JQL: Is there something like IN, but filtering for all tokens in a list (AND instead of OR)?

Frank Reiter
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!
July 5, 2022
status IN ("To Do", "In Progress", "Closed")

is the same as

status = "To Do" OR status = "In Progress" OR status = "Closed"



I'm looking for something being the same as

labels = "cats" AND labels = "dogs" AND labels ="pets"

Is there anything like this?

3 answers

3 accepted

3 votes
Answer accepted
Kristján Geir Mathiesen
Community Champion
July 5, 2022

Hi @Frank Reiter and welcome to the Community.

I think you will have to do:

labels = "cats" OR labels = "dogs" OR labels ="pets"

Also remember that if you want to see issues with nothing in the the Labels field, to include:

OR labels is empty

HTH,
KGM

Frank Reiter
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!
July 5, 2022

Thanks,  Kristján, so I'm not missing out some nice Jira feature unknown to me, but there is actually nothing equivalent to IN available, right?

Kristján Geir Mathiesen
Community Champion
July 5, 2022

Correct @Frank Reiter 

1 vote
Answer accepted
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.
July 5, 2022

Welcome to the Atlassian Community!

There's no such thing as "in" with "and".  It's logical nonsense because there's no way to explain it to the system you want to ask it of.  The closest you could get is "has all of these attributes", but no-one usually bothers to implement that because you can do it quite clearly with "x = y and x = z", and not a lot of people have a use for it.

0 votes
Answer accepted
Felipe Pazetto July 5, 2022

Like @Nic Brough -Adaptavist- said, it's unlogical to use a condition that is EQUAL and have AND to the same column/field. Even in SQL, this is wrong to use:

name = 'John' and name = 'Mary' and name = 'Susan'

The correct way is to use:

name in ('John','Mary','Susan')

I use this filters in my JIRA and I hope this can help you:

assignee in (5f53a61573a268004d29589b,6082d8f07495ff006a31c050) AND NOT (status = closed OR status = resolved OR status = Canceled) ORDER BY updatedDate DESC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events