Using wildcards in JQL search leads to errors

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

Sometimes, using wildcards in JQL search leads to errors.

For example, we need to search for all issues where the field "version" has values that start with "abc". Please refer to the below example and error.

JQL -  "version" ~ "abc*" 
Error - Terminal clause [abc*] resolves to too many literals

Environment

Non-working: Jira cloud

Working: JIRA server

Diagnosis

If we change the query a little and search for a more discrete value using a wildcard it may work. In our example, consider version field has the following values:

  • abc 22.1
  • abc 22.2
  • abc 22.3
  • abc 22.4

Here we can use search something like the below and it will work without any issues.

 "version" ~ "abc 22.*"  


Cause

This constraint has been added cautiously to improve performance. This also makes sure that we do not exceed the limit of arguments passed to the database.

Solution

Use a more discrete search so that we do not exceed the limit mentioned above.

Last modified on Oct 19, 2022

Was this helpful?

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