Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Select List and Comparison Operators

Derek DuPont
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 1, 2018

I have a Select List (single choice) custom field. I would like to to write JQL queries that can use comparison operators against the options for this field, either using the options' user-defined positioning for the comparison or performing an alphabetical comparison.

For example, if list ExampleSelectList had options A, B, C, and D (with positions matching that order in the field's configuration), then writing the following query would return issues with values A, B, and C, but not D:

ExampleSelectList <= "C"

These operators are currently not allowed on this type of field though (reference). Do I have any workarounds or should I instead reevaluate the objective I am trying to accomplish?

1 answer

1 accepted

1 vote
Answer accepted
Ignacio Pulgar
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.
October 1, 2018
Depending on your needs, a Cascade Select List might be an option.

Otherwise, you may use ScriptRunner to look for a regular expression in those options:

https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_regular_expressions
Derek DuPont
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 2, 2018

Thanks for the response Ignacio.

ScriptRunner looks like a very powerful tool -- it would be great to use regular expressions in JQL queries. I think this is out of scope with my current workload, but I will be keeping it in mind.

I don't think a Select List (cascading) will fit my needs unfortunately. I discussed my workflow with my teammates and ultimately I think the best path forward is to change the workflow so that I will not need to rely on this comparison query anyways.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events