A JQL Query fails with the error "the operator... is not supported by the... field" even though the operator should be supported by the field

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

    

Summary

Depending on which type of field is used to search for Jira issues in a JQL query, different operators will be available as explained in Advanced searching - operators reference. For example:

  • Fields of "text" type can be used with the "~" operator
  • Fields of "select list" type can be used with the "in (...,...,...)" operator 

This knowledge article describes a scenario where the JQL search box might return an error when using an operator that is supposed to be supported for a given field. For example:

  • Error 1

    The operator 'in' is not supported by the 'Some Field' field.

  • Error 2

    The operator '~' is not supported by the 'Some Field' field.

Environment

Jira Server/Data Center on any version from 8.0.0

Diagnosis

To verify if this knowledge article is relevant, follow the steps below:

  • Log in as a Jira Administrator
  • Go to the page ⚙ > Issues > Custom Fields
  • Search for the field which caused the error in the issue search page and look at the result
  • If you see at least 2 fields that are using the exact same name with different types (as illustrated in the screenshot below), then this article is relevant:
  • Another way to verify that multiple fields are using the same name is to start typing the field name in the JQL search. If you see multiple fields suggested in the UI, then this article is relevant:

Cause

There are multiple fields using the same name, but that have different types. Since different types of fields support different operators, when the Jira application tries to execute the JQL query using the field name, it is unable to decide which operator is supported, since the field name can refer to either field and therefore either type. Because of that, the JQL query returns an error saying that the operator used in the query is unsupported.

Solution

There are 2 ways to approach this issue, which are listed below.

Option 1 - Either ensure that all fields have unique names

Ensuring that each field has its own unique name will help avoid any confusion with the execution JQL query performed by the Jira application. When doing so, the Jira application will know which operator(s) are supported with the field used in the JQL query.

To rename any field using the same name:

  • Log in as a Jira Administrator
  • Go to ⚙ > Issues > Custom Fields
  • Search for the field which name has to be changed
  • Click on ... > Edit next to the field
  • Change the name, and click Update 

Option 2 - Use the custom field ID instead of the field name in the JQL query

For this option, you can follow the steps below:

  • Log in as a Jira Administrator
  • Go to ⚙ > Issues > Custom Fields
  • Search for the field that you need to use in the JQL query
  • Click on ... > Configure next to the field
  • Look for the ID at the end of the URL (this is the custom field ID), as shown in the example below:
  • Go back to the JQL query, and instead of using the field name, use the syntax cf[XXXXX] by replacing XXXXX with the custom field ID, as shown in the example below:


Last modified on Sep 20, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.