Hi,
I've tried to load a file containing a common class through
def utils = new GroovyScriptEngine( '/var/atlassian/application-data/jira/scripts/com/mprv/automations/EscalationSLA' ).with { loadScriptByName( 'EscalationSLA_utils.groovy' ) }
this.metaClass.mixin utils
Now, this sub-script contains calls to ruleContext:
String smartValue(value) { return ruleContext.renderSmartValues(value) }
(yes, I'm lazy - don't judge...)
however getting the error
com/mprv/automations/EscalationSLA/EscalationSLA_IssueTransition.groovy, error: groovy.lang.MissingPropertyException: No such property: ruleContext for class: EscalationSLA_IssueTransition groovy.lang.MissingPropertyException: No such property: ruleContext for class: EscalationSLA_IssueTransition at Utils.smartValue(EscalationSLA_utils.groovy:18) at EscalationSLA_IssueTransition.run(EscalationSLA_IssueTransition.groovy:50)
Seemingly, the rule context is not passed to the runtime of the second file - is this even possible?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.