Hi there Atlassian Community...
A few years back I had used the following in the 'Condition and Configuration' field to send a custom email (Jira v8.5.1 and SR v5.6.13.1-p5):
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.customfields.option.Options
import com.atlassian.jira.issue.customfields.manager.OptionsManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.RendererManager
import com.atlassian.jira.issue.fields.renderer.IssueRenderContext
import com.atlassian.jira.issue.fields.renderer.JiraRendererPlugin
def rendererManager = ComponentAccessor.getComponent(RendererManager)
def issue = ComponentAccessor.issueManager.getIssueByCurrentKey(issue.key)
def wikiRenderer = rendererManager.getRendererForType("atlassian-wiki-renderer")
def renderContext = new IssueRenderContext(issue)
config.deschHTML = wikiRenderer.render(issue.description, renderContext)
return true
I'm now attempting on creating a custom email using the info I had before, and am getting a warning on the def issue line.
"Variable "issue" masks a binding variable of the same name. Please choose a different name for variable: "issue" @[deleted] 11, column 5."
Does anyone know what this should be and/or why this isn't working any longer? I've tried making several updates based on things I was able to find in the community, but nothing is working.
Currently running most recent versions of both Jira and ScriptRunner.
Thanks--Lara