Forums

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

Writing a JQL query using a field from a pull-down menu

Alistair Jones November 1, 2023

I am trying to create a JQL query, where I test the value in a field that is populated from a pull-down menu.

The value is a "NR1" or "NR2" and the name of the field is "Network Release Fixed".

I have tried "Network Release Fixed" = "NR2" but that yields no results but I do have records with NR2 selected for the field.

I have also tried 

My query is "Network Release Fixed[Dropdown]" = "NR2" but I get the error message: "Field 'Network Release Fixed[Dropdown]' does not exist or you do not have permission to view it."

What could be my problem?

1 answer

1 vote
Mathew Lederman
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.
November 1, 2023

@Alistair Jones I'm guessing that you have a multi-select list which may be causing the issues. Instead of = I would recommend "in". So your JQL would look like this:

Network Release Fixed in (NR2)

If this doesn't work, there's a good chance the option NR2 has a space before or after the text. You may need to confirm with your admins as it can be difficult to identify from looking at an issue.

Alistair Jones November 1, 2023

Thanks for your reply, Mathew.  None of the following works:

"Network Release Fixed" in "NR2" - with or without quotes around NR2

"Network Release Fixed" in (NR2) - with or without quotes around NR2

Mathew Lederman
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.
November 1, 2023

Are you certain you have the field name correct? Below is an example of a single-select field returning the same results with "=" and "in". When using the "in" function, parentheses are required. 

Note: Quotes are only truly needed when the field or option has a space such as Network Release Fixed to avoid Jira from viewing these as three separate fields. NR2 doesn't have spaces so quotes aren't required.

Are you getting any errors with "Network Release Fixed" in (NR2)? Or just no results?

Can you share a screenshot of an issue where you see "Network Release Fixed" is set to NR2? 

image.pngimage.png

Alistair Jones November 1, 2023

 

Hi Mathew,

I posted some screen shots.  I don't think I have spaces or special characters but I inquired of the JIRA administrator just to make sure.

I do agree that if I am not matching with the "NR2" string, this would be the reason for no results.

So, while I await an answer from the administrator, I am conducting my due dilligence.

Suggest an answer

Log in or Sign up to answer