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