Custom field name can't be used in JQL in Jira Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Certain custom fields can't be used in JQL, and cause errors due to multiple custom fields with the same name. For example, an error message might look like the following:
The operator '=' is not supported by the 'Insight_obj' field. There are multiple custom fields with the name 'Insight_obj'. Try using one of the following terms: cf[10151], "Insight_obj[Short text]".
Cause
Jira allows creation of custom fields with existing system/custom field names which causes duplicate custom fields. We do have a feature request to prevent duplicated field names, tracked here:
Therefore, duplicated custom field can be created in either:
A team-managed space
The global Custom fields page at:
https://<site-name>.atlassian.net/secure/admin/ViewCustomFields.jspa
Solution
Choose how to identify the field
If multiple custom fields share a name, use the alternatives shown in the JQL error to identify the intended field. You can use its ID, such as cf[10151], or combine its name with its type, such as "Insight_obj[Short text]". These are examples from the article; use the ID or typed name for your field. Renaming is not required to use the field in JQL.
Renaming either of the fields will resolve the issue and user can access the field name in the JQL without any error.
If you are not looking to rename either of the fields, then you may search using the custom field ID instead. For example, a field with ID number 10151 can be searched in JQL as cf[10151].
Additionally, you can combine the field name with its type as suggested in the JQL error.
Rename a custom field from a team-managed space
Go to the affected team-managed space > Space settings > Request Management.
Go to the request type where the field has been created and added.
Expand the field and rename it.
Save changes.
If you are unable to locate the team-managed space where the custom field is created, you may reach out to Atlassian support for assistance.
Rename a duplicated global custom field
Go to Settings > Work items > Fields
Alternatively, you can visit the direct link
https://<site-name>.atlassian.net/secure/admin/ViewCustomFields.jspa
Search for the field by name
For one of the fields with same name, select More options (...) > Edit details
Rename the field
Select Update
Verify the intended field
Run the query with the field identifier you selected and check that it refers to the intended custom field. If the error lists multiple fields, compare your identifier with the alternatives in that error before changing a field name.
Was this helpful?