When trying to use a JQL function provided by ScriptRunner, it doesn't work and an error message similar to the following appears:
The precise package and class of the
getQuery method may vary but importantly the package will not be within ScriptRunner's namespace (
There are various Jira add-ons (e.g. JQL Tricks, JQL Booster Pack) which provide JQL functions with the same names as ScriptRunner JQL functions. If one of these add-ons is installed alongside ScriptRunner for Jira, the same-named functions can clash, resulting in errors of the kind shown above.
The best workaround is to disable the clashing module from one of the add-ons (i.e. either ScriptRunner or JQL Tricks/JQL Booster Pack/etc.)