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

This widget could not be displayed.
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

thanks!

This widget could not be displayed.

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
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

159 views 1 3
Join discussion

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