Jira has a 65K issue limit for JQL functions by default due to the limitations of the underlying Lucene indexing mechanism, and there is a Jira issue for this problem. You might see the effects of this limit in TTS functions if you have many issues in your Jira instance.
If any custom function, including TTS custom functions, returns more than 65K issues, you will get empty results.
You can increase this limit to a higher value by setting the maxclauses limit in jira-config.properties file as instructed here. We have summarized the steps below:
- Create jira-config.properties file under <jira-home> directory, if it does not already exist.
- Add the jira.search.maxclauses property with the new value, something higher than 65K. Please select the proper value for your environment and queries.
- Restart Jira.
Alternatively, you can use date parameters in your TTS queries to narrow down your scope, as described here. This way, you can lower the result count and eventually run your queries without hitting the 65K limit.
|Keep in mind that the 65K limit is counted against each JQL function rather than the whole query. So even your complete query covers less than 65K issues; if any TTS JQL function exceeds this limit, you will get empty results. This case is a result of the lack of query optimization in custom JQL functions. TTS has to analyze all issues in your Jira instance and has to return all matching issues no matter which conditions (project, assignee, created date, etc.) you set before.|