Forums

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

How to query for only a part of a select list option?

Gergely Groupama
Contributor
February 22, 2023

Hi!

I have a select list custom field with options that contain a two component identifier: a name and a numeric identifier. It looks something like this: XYZ (001).

I would need the option to query for only the numeric value. Currently I can only query for the entirety as the jql will only prompt options when I write XYZ, but will yield no results when trying to look for 001.

I can't for the life of me figure out a solution. Anyone have an idea what I could do? :)

Thanks

 

1 answer

1 accepted

0 votes
Answer accepted
Vamsi Kandala
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.
February 22, 2023

Hi @Gergely Groupama,

If you have ScriptRunner installed, you can make use of 'issueFunction'.

Try this:

issueFunction in issueFieldMatch("project = XYZ", "customfield_xxxxx", "001")

Where, replace 'XYZ' with your project key and replace 'xxxxx' with the id of your custom field.

Hope this helps.

Thanks,
Vamsi

Gergely Groupama
Contributor
February 23, 2023

Hello, Vamsi,

I really like you... :D

The solution works like a charm!

Thank you ever so much!

Best regards,

Greg

Vamsi Kandala
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.
February 23, 2023

Hi @Gergely Groupama

Thank you.  Glad that it worked out for you.

Regards,
Vamsi

Suggest an answer

Log in or Sign up to answer