Is there a way to filter by multiple labels at once using JQL?

Faraaz Saiduzzaman August 16, 2022

Hello Jira community!

I am looking for a way to filter by multiple labels at once. I've previously used a filter to filter by several labels, as so:

labels in (HUD, Design, UX) ORDER BY labels ASC

The problem with this is that the search displays issues matching ANY of the labels in question, as opposed to what I want, which is ONLY issues matching ALL the labels.

I hope I'm making sense! It doesn't seem like this use case is what the AND operator is used for, so I wonder if there is a way to create an exclusion within the parentheses perhaps?

Thanks for your help,

Faraaz

3 answers

1 accepted

0 votes
Answer accepted
Faraaz Saiduzzaman August 22, 2022

Hi @Mykenna Cepek and @Bharathi

 

These solutions are technically correct for if I was intending to show issues that match all three labels at the same time, which is a valid and helpful suggestion, so thank you. 

However, my intended usage is to show issues that match two labels at a time. Essentially, as an example, I want it to show:

1. Issues that have the labels HUD and Design,
2. Issues that have the labels UX and Design,
3. Issues that have the labels Map and Design,

And so on.

I do not want the filter incorporating this search to show all Design issues (since not all of them are relevant), nor do I want it to show all UX issues, for example, since those issues may be in another discipline (e.g. Engineering).

I hope my explanation makes sense. Thanks so much for your help!

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 22, 2022

So the question changes to:

labels in (HUD, UX, Map) and labels = Design

Like Faraaz Saiduzzaman likes this
Faraaz Saiduzzaman August 25, 2022

This worked!  Thanks so much. I think I need to learn to distinguish between the use case of "=" and "in" as well.

-Faraaz

2 votes
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2022

Have you tried something like this?

labels in (HUD) and labels in (Design) and labels in (UX) ORDER BY labels ASC
0 votes
Bharathi
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.
August 17, 2022

Hi @Faraaz Saiduzzaman,

As @Mykenna Cepek has rightly pointed out, you need to specify each label separately with an "AND" in between.

labels = HUD AND labels = Design AND labels = UX ORDER BY labels ASC
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 18, 2022

What @Bharathi suggested is a bit simpler than what I wrote. Either one will work.

Like Bharathi likes this

Suggest an answer

Log in or Sign up to answer