Does JQL produce searches for values from a dropdown custom field

Jean Ann Harrison
Contributor
February 27, 2023

I've been trying to search issues based on a customized field which I created along with specific values from a dropdown type.  When I write a query specifying a value within the dropdown options available, I get an error:  "The option for the field does not exist" yet I know that value does exist since I created that custom field with the options.  

 

I have tried to create more than one query based on dropdown values for more than one custom field and have not been having any luck going beyond the error.  As such, it has started to make me wonder if it's possible although I would think, that indeed I should be able to search issues based on a custom value for any field despite the type of that field's value options.  

An example of my query:   Project = "<project name>" AND "<custom field name>" = "<option within the dropdown>"

 

Any thoughts?  Thank you in advance for any advice.

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2023

Hello @Jean Ann Harrison 

Your question is posted in the Confluence Questions community, but is about creating a Jira query. Are you trying to create this query within a Jira Macro in Confluence, or are you actually working within Jira itself? (If you are working in Jira itself, then I'll move your post over to the Jira Software Questions community.)

If you are in Jira and trying to create such query, are you working in the Advanced Issue Search screen?

If you are working in Advanced Issue Search, after specifying the custom field name and entering the "=" character and then a space, the possible values for that field should display before you type anything in, similar to what I've shown below. Do you get something similar? Do you see the value you want in the list?

Screen Shot 2023-02-27 at 4.27.04 PM.png

Jean Ann Harrison
Contributor
February 27, 2023

Thank you Trudy for your assistance.  

Yes, I'm trying to create a query in Jira and NOT in Confluence.  Sorry that I entered it in the Confluence space.  That was an accident.  

Regarding whether I see the list of options to choose while typing my query, the answer is no, I do not see the option list while typing my JQL or any of the options I created after identifying my custom field and follows with the appropriate operator which is actually a !=.  

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2023

Hello Jean,

It was easy for me to move your post, so no harm putting it in not quite the right community. :)

Is this custom field for a Team Managed project or is it a custom field created for Company Managed projects?

Can you show us an example of the field and its options within an Issue Details screen?

Was the field created very recently?

Jean Ann Harrison
Contributor
February 27, 2023

Again, thank you.  

It's a team managed project (I am a Jira admin though).

The field was created today, and I was careful to refresh my browser prior to executing the query.  

Dropdown values.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2023

Hm, I thought there might be some delay for recently created fields but I just created a new Dropdown field in a Software Team Managed project, navigated to the Search screen in the same browser tab, and immediately was getting the autocomplete help.

Screen Shot 2023-02-27 at 5.30.57 PM.png

Screen Shot 2023-02-27 at 5.25.29 PM.png

Do you get JQL Auto-complete help for finding field names or possible values for other Dropdown/Selection List type fields?

Can you provide a screen image of what you do see in the Advanced Issue Search screen?

Is this a custom field for a Software, Service, or Work Management project? I don't think that should make a difference, but I did only try with a Software project so far.

Jean Ann Harrison
Contributor
February 28, 2023

This is a practice board I've created so I can play with different types of functions, searches etc.  So this I would assume is a software project and not a Work Management project.  

Here's the screenshot:

searvh cudtom fields.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2023

Do you get JQL Auto-complete help for finding field names or possible values for other Dropdown/Selection List type fields, like I showed in the images of my last response?

Can you try typing in just the first part of the the field name for Frequency (i.e. Fre) and showing us what the Auto-complete is providing as suggestions?

I am concerned that the field name is showing in your image as "Frequency" rather than "Frequency[Dropdown]". Given that it is a custom field from a Team Managed project, they typically will show their field type as well as the field name in the filter, as in my image.

Like Jean Ann Harrison likes this
Jean Ann Harrison
Contributor
February 28, 2023

I don't see a JQL Auto-complete to be able to find the names of the values for the custom field which I did create however, the field name and drop down list "Priority" I do see. I did confirm the custom field "frequency" definitely shows as a dropdown list type.  

See the examples:  auto dropddown list.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2023

So, auto-complete is turned on. That was the first thing I wanted to verify.

For trying to auto-complete the Frequency field name, try typing in Fre without any quotes.

Screen Shot 2023-02-27 at 5.30.57 PM.png

Jean Ann Harrison
Contributor
February 28, 2023

So here's what I tried below.  FYI, I also tried open quotes and no quotes for the field value:Frequency auto-dropdown.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 28, 2023

Now I think I see the problem.

Notice that there are three Frequency fields showing up in the Autocomplete? Which one of those three are you selecting?

The first two are, I believe, Frequency fields that have been created in Team Managed projects. I believe this because autocomplete is showing "Dropdown" next to them and that is a field type only in Team Managed projects.

The third one is, I believe a custom field created for use in Company Managed projects. I believe this because it shows "Select list (cascading)" as its field type, and that applies to Company Managed project custom fields.

Based on that, and since you are trying to filter issues in a Team Managed project, I believe you need to be selecting one of the first two.

The problem remains that you have two custom fields still with the same name but used in two different Team Managed projects. In those two different projects the Dropdown field may have different options. So how do you know which one to pick?

This is one of the reasons I don't care for Team Managed projects.

The only way to determine which field is the right one to pick is to either experiment with each one, or go back to your Team Managed project and change the field name so that it is unique.

Like Jean Ann Harrison likes this
Jean Ann Harrison
Contributor
February 28, 2023

Ah ha!  This all makes sense.  Yes, I'll change the name to avoid further confusion.  I'll be very aware of this in the future so we can avoid this problem when creating filters.  

 

Thank you so much for you patience and diligence.  This is so incredibly helpful and a learning moment for me.  

Like Trudy Claspill likes this

Suggest an answer

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

Atlassian Community Events