Hello everyone,
I have set up an automation rule that triggers on the "Issue Deleted" event, and consequently, among other actions a Scriptrunner Groovy script is executed to remove that issue key value from a Select List customfield.
The problem is that within the script, the 'issue' variable is null, even though I can access its key from the rule. Is there any way to pass that issue-related information from deleted issue to the Groovy script?
Scriptrunner listener is another option, but I want to know if this is possible with Automation.
Thanks!
After consulting with Scriptrunner support, I reply to myself.
The solution consists of evaluating Smart Values from the script using the 'ruleContext' binding variable as follows:
ruleContext.renderSmartValues('{{issue.key}}')
You can also create custom variables from Automation and retrieve them in the script in the same way.
This is documented here: link to documentation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.