Statusredirect |
---|
colourfilename | Green |
---|
title | Since version 5.3.2.2 |
---|
|
In case you want to render issue email audit log in your email, you must edit your email templates. The key attribute is $!issue.auditLog that returns a list of email audit log entries or an empty list.
When selecting "Email Log" in the Field Picker dropdown, you will get instructions on how to easily include issue email audit log information in the template.
In case you want a customized display (e.g. apply different layout or styles), then you can start to add these template fragments directly into your templates and customize them according to your needs.
Code Block |
---|
language | html/xml |
---|
title | Render issue email audit log in HTML emails |
---|
collapse | true |
---|
|
#macro (addTableHead $headerLabel)
#if ($!isJIRA61OrLater)
<th><strong style="font-weight:normal;color:${textSubtleColour};">$headerLabel</strong></th>
#else
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 10px 10px 0;white-space:nowrap;"><strong style="font-weight:normal;color:${textSubtleColour};">$headerLabel</strong></td>
#end
#end
#macro (beginTd)
#if ($!isJIRA61OrLater)
<td>
#else
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;">
#end
#end
#macro (endTd)
</td>
#end
#set($auditLog = $!issue.auditLog)
#if ($!auditLog && $!auditLog.isEmpty() == false)
<h3>Emails</h3>
<table>
<tr valign="top">
#beginTd()
#foreach($audit in $!auditLog)
<div class="issue-data-block">
<div class="actionContainer">
<div class="action-details">
$!audit.senderName $!audit.actionLabel - <span class="date">$!audit.timestamp</span>
</div>
<div class="action-body222">
<table>
#if($!audit.from)
#set($fromHtml = $!audit.from)
<tr valign="top">
#addTableHead($i18n.getText("email.audit.from"))
#beginTd()
$!fromHtml
#endTd()
</tr>
#end
#if($!audit.to)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.to"))
#beginTd()
<span class="email-to-full">$!{audit.to.fullLabel}</span>
#endTd()
</tr>
#end
#if($!audit.cc)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.cc"))
#beginTd()
<span class="email-to-full">$!{audit.cc.fullLabel}</span>
#endTd()
</tr>
#end
#if($!audit.bcc)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.bcc"))
#beginTd()
<span class="email-to-full">$!{audit.bcc.fullLabel}</span>
#endTd()
</tr>
#end
#if($!audit.emailSubject)
#set($subjectHtml=$!audit.emailSubject)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.subject"))
#beginTd()
$!subjectHtml
#endTd()
</tr>
#end
#if($!audit.emailBody)
#set($bodyHtml = $!audit.emailBody)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.body"))
#beginTd()
$!bodyHtml
#endTd()
</tr>
#end
#if($!audit.attachments)
#set($attachmentsHtml = $!audit.attachments)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.attachments"))
#beginTd()
$attachmentsHtml
#endTd()
</tr>
#end
#if($!audit.options)
<tr valign="top">
#addTableHead($i18n.getText("issuemail.form.mail.options"))
#beginTd()
<ul>
#if($!audit.addComments)
<li>$i18n.getText("issuemail.form.options.add.comments")</li>
#end
#if($!audit.replyToMe)
<li>$i18n.getText("issuemail.form.options.from.me")</li>
#end
#if($!audit.addToWatcher)
<li>$i18n.getText("issuemail.form.options.add.to.watchers")</li>
#end
</ul>
#endTd()
</tr>
#end
</table>
</div>
</div>
</div>
#end
#endTd()
</tr>
</table>
#end |
...
title | Render issue email audit log information in TEXT emails |
---|
collapse | true |
---|
...
location | https://docs.meta-inf.hu/email-this-issue-for-jira-server-data-center/documentation/outgoing-emails/email-templates/adding-email-audit-log-to-email-templates |
---|
|
Thank you for visiting our old product documentation site. Note that we no longer store or update our documentation here.Please navigate to our new documentation site and update your bookmarks accordingly. If you're looking for the former content of this page, click here. |