Hello,
i have a big problem. I need to change the email template in jira datacenter.
What i need is, that on every mail the mail subject should include a custom field value.
This solution works for the mail templates without batching notification:
issueupdate.vm
#set($customFieldManager = $componentManager.getCustomFieldManager())
#set($serialnumberField = $customFieldManager.getCustomFieldObject("customfield_10xxx"))
#set($serialnumber = $issue.getCustomFieldValue($serialnumberField ))
#if ($serialnumber)
($issue.key) [$serialnumber] $issue.summary
#else
($issue.key) $issue.summary
#end
#set($customFieldManager = $componentManager.getCustomFieldManager())
#set($serialnumberField = $customFieldManager.getCustomFieldObject("customfield_10xxx"))
#set($serialnumber = $issue.getCustomFieldValue($serialnumberField ))
#if ($serialnumber)
#set($headersum = "[$serialnumber] " + "$header.issueSummary" + " with SNR")
$i18n.getText('issue.update.batch.mail.subject', [$header.issueKey, $headersum])
#else
#set($withoutSN = "$header.issueSummary" + " wihtout SNR")
$i18n.getText('issue.update.batch.mail.subject', [$header.issueKey, $withoutSN ])
#end
The var serialnumber is always empty / null and i have no clue how to solve that issue.
I hope you can help me.
Thx