Hi,
I'm trying to send a custom email to the assignee\reporter, the email is being sent but it only shows the subject, not the message.
I use the template that ScriptRunner suggest:
def fields = get('/rest/api/2/field')
.asObject(List)
.body as List<Map>
def customFieldId = fields.find { it.name == 'Category' }.id as String
def customFieldValue = (issue.fields[customFieldId] as Map)?.value
"""Dear ${issue.fields.assignee?.displayName},
The ${issue.fields.issuetype.name} ${issue.key} with priority ${issue.fields.priority?.name} has been assigned to you.
Description: ${issue.fields.description}
Custom field value: ${customFieldValue}
Regards,
${issue.fields.reporter?.displayName}"""
And I tried to modify the text but nothing works. What is wrong? How can I make the text appear in the email's body?