search multiple values on a text custom field

Andrew Nicholson April 8, 2013

Hello -- I am looking for a way to do something like 'find a list of issues where customfield IN ('value','value')

My custom field is a text field of 255 characters or less

JQL doesn't appear to support this -- is there another way to do it? Maybe by searching directly on JIRA's database? Or a plugin that I am not aware of?

oh! I am running downloadable JIRA 5.2 as a standalone instance

2 answers

1 accepted

1 vote
Answer accepted
Claus April 9, 2013
You can allways go through Database. If you want to geht exact values your in clause will fit. Jiras Luceene index search is Used similar to "like" in Database and this Means like ... Or like... Customfields are stored here: Example for green hopper story points: SELECT * FROM customfieldvalue WHERE customfield = ( SELECT ID FROM customfield WHERE cfname = 'Story Points' ) AND issue in ( SELECT id FROM jiraissue WHERE pkey IN ('Issue-Key') );
Andrew Nicholson April 9, 2013

I think I will go with this method -- searching directly on the database seems the fastest and easiest way -- this will prevent having to specify fieldname ~ multiple times

thanks!

Like # people like this
0 votes
Ramiro Pointis
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.
April 8, 2013

Hi Andrew, I believe it's not possible to do that because 255 characteres it's too much to have like an exact value. In fact, I think the only way to check a value in that kind of field would be something like:

"customfield ~ word1"

So you can do something like:

"customfield ~ word1 OR customfield ~ word2"

But I think it's very uncertain.

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.
April 8, 2013

That's roughly what I was going to say - the clause looks like "cf ~ value1 OR cf ~ value2" to me.

Or, if it really is an exact phrase, the ~ operator will get immensely close and try to pick up values that are mistyped, which is probably better than a precise match when looking at a raw text field.

Maybe I've misunderstood the question?

Andrew Nicholson April 9, 2013

a-ha, this would work -- thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events