Search for 2 labels (A AND B) AND no other label

Hendrik Boldt June 10, 2015

Hello,

i have a small problem. I want to search for 2 labels sharp!

Whats this means. There are some issues with label A and B. Some Others have A and B and C ...

I want to search for the issues with the label A AND B without the test with more labels. This seems to be an odd search but i need this. 

I tried some thing like

(labels = A AND labels = B) AND labels != *

But this is obviously an invalid input.

 

Can some one help me with this issue?

 

THX

Hendrik

3 answers

1 vote
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.
June 10, 2015

I don't think you can do this off-the-shelf.  

I know of an easy trick though, I did it with a derived field addon (I'd do this with Script-runner now).  The field provided was a simple "number of labels" number field, so you could do "labels = A and labels = b and number-of-labels = 2"

 

Midori
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.
June 10, 2015

Creative!

0 votes
Hendrik Boldt June 10, 2015

@Arthus Goncalves

The labels in does for me:

label = Label1 OR label = Label2

This is not what i wanted. 

 

@Nic Brough 

Thx maybe i will try that!

0 votes
Arthur Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2015

Hi Hendrik,

You can use a JQL like the one below:

labels in (label1, label2, label3)

-- Arthur Gonçalves

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.
June 10, 2015

I don't think that's right - if I understand the question correctly, Hendrik wants "issues which have label1 and label2, but no other labels". Your JQL will find any issue that has label1, label2 or label3

Suggest an answer

Log in or Sign up to answer