I have a field that we have created that is a single select drop down list. Within this list is a series of 12 numbers. I need to be able to search on this field using the ">=" or "<=" operators.
Is this possible? Any thoughts on how to do this?
I do not think you can do that with out-of-the-box JQL. You might be able to type-convert if you have scripting addons from the marketplace. Or build something using automation rules.
A work-around would be to use a membership test. For example...
@Bill Sheboy , thanks. Unfortunately, that is not going to be attainable as our list of numbers is ever growing and changing. We need something that will allow us to use those search operators.
We do have Scriptrunner. I am just not familiar enough with scripting on how to write such a code.
Using ScriptRunner, you can create a scripted numeric field. The script would simply be
This will give you a field that you can apply the ">" operator to.
Make sure that you set the Searcher to Number in the Custom Field configuration when you create the scripted field. You will also need to reindex so that the index has the values of the custom field.
@Derek Fields unfortunately, this does not allow me to create a drop down menu and I don't trust my developers to input things in properly or consistently with just a text field.
I also keep getting an error with your code. It gives me a static error as well as just not being able to run it.
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events