You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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?