Forums

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

how to fetch jql for multiselect field having more than one value

Amzad Khan January 23, 2024

I am trying to fetch a jql for multiselect field where the values in the mutiselect field has more than one value, how can I achieve this ?

 

Country relevance is more than one.PNG

2 answers

0 votes
Uday Kiran Bhaviri
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.
January 23, 2024

Hi Amzad, You can use 'in' operator similar to the status field from the image.

Example: if your multi select field name is ABC and values are 1,2,3,4 then in the query you need to write the following to fetch the records whose values can be 1 or 3 or 4

ABC in ("1","3","4")

Hope this will be helpful.

Amzad Khan January 23, 2024

Hi Uday, 

Thanks for your reply your above solution will help to fetch the issues with any particular values for custum field ABC in (1,2,3) will filter the issues with those values.  Here, the values should be 1 or 2 or 3.   I want to fetch the issues, which has multiple values more than one value

Uday Kiran Bhaviri
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.
January 24, 2024

Yes the same query will work for multiple values as well.

Example: if issue field ABC has multiple values selected like 1,2

ABC in (1,2,3) still works.

Like Assane Ba likes this
Tom Hudgins
Contributor
February 3, 2025

This is not what the OP is looking for. He wants to find issues where there is more than one value in a multi-select field. He doesn't know the values, he just wants to find the issues where there is more than one.

ABC in (1,2,3) will find issues where ABC == 1, which is not what he wants.

If you had a field with a very small option list you could do a couple of OR's against all the possible multi-value combinations but that doesn't scale very far at all. 

Obviously, I was looking for a solution for this too. I'm thinking the only way to do this is with a script (Scriptrunner?). I can easily write one but I was just looking for something in-built.

0 votes
Rilwan Ahmed
Community Champion
January 23, 2024

Hi @Amzad Khan ,

  1. you need to run JQL as below to check if ticket has all values
    MultiSelectfieldName  = Value1 AND MultiSelectfieldName   = Value2
    Example:
    project = Sandbox and ("Access Type[Select List (multiple choices)]" = Permanent AND "Access Type[Select List (multiple choices)]" = Temporary)
  2. To check if any values is matching, then 
    MultiSelectfieldName IN (Value1, Value2)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events