JQL to exclude a value of a custom field of type Select List (multiple choices)

Kalai July 14, 2021

I hav a custom field of type Select List (multiple choice)

I'm able to query, "Field_Name" = "Value_1" fine. But I want to just exclude Value_1. The != operator doesn't work. 

Also tried the  issueFunction in issueFieldMatch(subquery, fieldname, regex) but not sure how to represent the ! (NOT) a selected option in the regex. 

Appreciate any help! 

 

3 answers

0 votes
Daniel Ebers
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.
July 19, 2021

Hi @Kalai

I found a related Bug which seems to imply that also a wildcard is involved, though.
Are you saying that the query just not works properly as soon as a slash ('/') is in one of the values of the field you are querying for? Other way around: "Value_x" works - or was this just an example.

I think we need the following from you:

Could you please list the complete JQL query here that is troubling - probably alongside with the values of the select list (it is fully okay to anonymize them),

Regards,
Daniel

0 votes
Kalai July 14, 2021

After some trial and error. Two observations: 

1.  ( "Field_Name" not in ("Value_x")) works for most of the. cases, just not the one I want probably because it has a "/" in it? 

2. For the case with the. "/" in it when I do  ("Field_Name" is EMPTY or  "Field_Name" not in ("Value_1")) it works fine. 

I'll try removing the "/" or create one more item in drop down with "/" and see how it goes to test out no. 1. 

Any insights? 

0 votes
Sreenivasaraju P
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.
July 14, 2021

Have you tried not in function.

 

NOT IN ("option 1","option 2")

Kalai July 14, 2021

@Sreenivasaraju P  Thanks for the response. Yeah that didn't. work for that particular value "Not exists/NA" something. like that.... more details in my comment below. Not sure if it is the "/" and if there is any way of escaping it. 

Suggest an answer

Log in or Sign up to answer