I've created custom template for certain WF-event, which displays some exact fields in the template.
I retrieve field name translation using:
$textutils.htmlEncode($velocityhelper.getFieldName("customfield_10303", $i18n))
But, it doesn't work reliably. Sometimes it returns english custom field name, even when whole email content is using right translation.
Community moderators have prevented the ability to post new answers.
I've made it working, I had to dive into the implementation of the CustomFieldImpl.getName(), and I've ended up with following code:
<tr> #set($resolutionTextField = $issue.getCustomField("customfield_10303")) #set($nameKey = "jira.translation.custom.field" + $resolutionTextField.getId() + "." + "name" + "." + $i18n.getLocale()) #set($fieldName = $resolutionTextField.getPropertySet().getString($nameKey)) <th>$textutils.htmlEncode($fieldName):</th> <td>$textutils.htmlEncode($issue.getCustomFieldValue("customfield_10303"))</td> </tr>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.