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

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!

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

770 views 2 19
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