search multiple values on a text custom field

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

0 votes
Accepted answer
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') );

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


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.

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?

a-ha, this would work -- thanks!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,721 views 17 21
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you