Details
-
Bug
-
Status: Done
-
Minor
-
Resolution: Done
-
5.4.29
-
None
-
None
-
Sprint 44, Sprint 51, DevTools 72, DevTools 73
-
0.7
Description
When requiring commits to be associated with Jira issues, you can specify a templated Groovy string as the JQL query that filters the issues. This string is evaluated in a context that includes projectKey, the key of the BB project receiving the commits, but this context is provided only to the script engine and not the static type checker. Thus the type checker complains:
groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: GStringTemplateScript101.groovy: 2: [Static type checking] - The variable [projectKey] is undeclared. @ line 2, column 66. r out -> out << """project = $projectKey ^ 1 error at com.onresolve.scriptrunner.canned.bitbucket.util.AbstractRequireValidJiraIssue.buildJqlClause(AbstractRequireValidJiraIssue.groovy:263) at com.onresolve.scriptrunner.canned.bitbucket.hooks.RequireValidJiraIssue.doScript(RequireValidJiraIssue.groovy:180)