Details
-
Suggestion
-
Resolution: Fixed
-
None
Description
GH is generating queries like this:
JQL Query: {project = 10240} AND {fixVersion = 14978} AND ( {fixVersion is EMPTY} OR {fixVersion in unreleasedVersions()} ) AND {status in ("6", "5")} order by cf ASC, key ASC
The unreleasedVersions() function is inefficient when you don't pass a project because it will return all versions across JIRA that have been unreleased. On a JIRA with a lot of unreleased versions (e.g. 600) this will slow down both query generation and the Lucene querying. Passing a project into the unreleasedVersion will significantly increase the performance of GH on instances with a large number of unreleased versions. For example:
JQL Query: {project = 10240} AND {fixVersion = 14978} AND ( {fixVersion is EMPTY} OR {fixVersion in unreleasedVersions('JRA')} ) AND {status in ("6", "5")} order by cf ASC, key ASC
Note that when you pass the project into the 'unreleasedVersions' function it much faster to pass the project KEY when compared against the project ID.