How to make a search for X different values on a custom field?

Master0010 January 19, 2015

Hi,

I'm trying to make a search on all my issues for those that contain "ID12345" or "ID54321" or "IDXXXXX" on the custom field "my ID". From what I read it should be:

project = XPTO and "my ID" ~ "ID12345 ID54321 IDXXXXX"

I don't get any error but I also don't get any results. What am I doing wrong?

 

I'm using JIRA v6.3.5

2 answers

1 accepted

1 vote
Answer accepted
Błażej O_
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.
January 19, 2015

If you're searching for the text values you have to use "text search". You can use OR operators, but you have to use them INSIDE the quote. And the "OR" operator must be written in capital letters:

project = XPTO and "my ID" ~ "ID12345 OR ID54321 OR IDXXXXX"

There is much more valuable info here:

https://confluence.atlassian.com/display/JIRA/Performing+Text+Searches

Mastering the text searches will make you definitely an "above average" user wink

1 vote
Peter Bengov
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.
January 19, 2015

Try this instead

project = XPTO AND ("my ID" ~ "ID12345" OR "my ID" ~ "ID54321" OR "my ID" ~ "IDXXXXX")
Master0010 January 19, 2015

That would work on this case, but what if I want to search for 30+ IDs?

Peter Bengov
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.
January 19, 2015

How about using IN? That might work too: "my ID" IN (id1,id2,id3...)

Master0010 January 19, 2015

I get this error: The operator 'in' is not supported by the 'my ID' field.

Peter Bengov
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.
January 19, 2015

Bummer. Text fields support ~ operator but not IN. Unfortunately I'm not aware of another solution.

Suggest an answer

Log in or Sign up to answer