Script Runner Custom Email
<p>
You have been assigned as a Tech Resource to $issue.issueType.name <a href="$baseUrl/browse/<% out << issue.key %>">$issue</a> with priority <% out << issue.priority?.name %>.
<br></br>
<%
def rendererManager = com.atlassian.jira.component.ComponentAccessor.getComponent( com.atlassian.jira.issue.RendererManager.class)
def fieldLayoutItem = com.atlassian.jira.component.ComponentAccessor.getFieldLayoutManager().getFieldLayout(issue).getFieldLayoutItem("description")
def renderer = rendererManager.getRendererForField(fieldLayoutItem)
String desc = renderer.render(issue.description, null)
String description = "Description: " + desc
%>
$description
<br></br>
Last Comment:<br>
<% out << componentManager.commentManager.getComments(issue)?.last()?.authorUser.displayName %> –
<% out << componentManager.commentManager.getComments(issue)?.last()?.body %>
</p>
Error
Exception in thread "Thread-6132" 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:
GStringTemplateScript31.groovy: 2: unexpected char: '\' @ line 2, column 57.
n { out -> out << """($issue) \CPP\Dicse
Description has \CPP\code in it which it appears to be erroring on and not sending an email. Is there a way to fix this?