I've created a custom .vm email html template for the purpose of showing the issue's Epic.
I can get the epic link "key" just fine, but I want to convert that to the Epic Key's corresponding name.
For example = if the epic key is TP-101, the name of it actually "Test Epic 1".
#disable_html_escaping()
#set($issueEpicKey = $issue.getCustomFieldValue("customfield_10204"))
#set($issueEpic = $issue.EpicLinkCFType().getEpicDisplayName($issueEpicKey))
<tr valign="top">
<th><strong style="font-weight:normal;color:${textSubtleColour};">#text("Epic"):</strong></th>
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;">
$issueEpic
</td>
</tr>
Am I using the correct Class to get the name?
Thanks
-Lar
Community moderators have prevented the ability to post new answers.
I'm pretty sure, that "$issue.EpicLinkCFType()
" won't work, because the class com.atlassian.jira.mail.TemplateIssue
, which is used in mail templates, does not have a method like that.
Try something like this instead:
#set( $epicCF = $issue.getCustomField("customfield_10204") ) #set( $issueEpicKey = $issue.getCustomFieldValue($epicCF) ) #set( $epicDisplayName = $epicCF.getCustomFieldType().getEpicDisplayName($issueEpicKey) ) ... ## use $epicDisplayName
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.