Hello everyone and thank you in advance. I followed this article to add some custom fields to emails and it works with text fields but not with number/date fields. Has anyone got this to work? Thank you! See screenshots for what I see in the email.
Hello Kevin,
Actually getting the value for number/date is same. Only different formatters can be used.
Are you sure that the issue has non empty Business Value custom field value. And is this Business Value field a standard Jira Number field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, I can confirm the field is not empty and I've tried with both a standard date field and standard number field. It actually doesn't matter if the value is empty or not, I get the same result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok followup question, what's @customfield? Did you define it before usage?
Any chance to share the entire vm file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the vm file for the custom field. I get the custom field ID from the DB and reference it in the vm file. (customfield_13811)
#disable_html_escaping()
#set ($customfield = $customFieldManager.getCustomFieldObject("customfield_13811"))
#if($issue.getCustomFieldValue($customfield))
<tr>
<th>#text($customfield.name):</th>
<td class="has-icon">
$issue.getCustomFieldValue($customfield)
</td>
</tr>
#end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I could not find anything wrong with your code. It is as it is supposed to be.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.