is what you would type if the email was in text format but what do you type if you wanted to edit every email in html format to show a custom field
You can take a look into the html/includes/fields directory to get some examples. Additionally it's a good idea to create a .vm there for your customfield and include it in the main templates.
Something like this
#disable_html_escaping() #if ($issue.getCustomFieldValue("customfield_10075")) <tr valign="top"> <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};">Name of field:</strong> </td> <td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;"> $issue.getCustomFieldValue("customfield_10075") </td> </tr> #end
Henning
Thank you
my custom field is now showing correctly
but it contains the following brackets
[] e.g [custom field]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it's a Select Field or similar you must write
$issue.getCustomFieldValue("customfield_10075").getValue()
because getCustomFieldValue returns an Option object
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its a multiselect
this is what I tried but it doe not work
#if ($issue.getCustomFieldValue("customfield_10021"))
<tr valign="top">
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};text-align:left;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:${textSubtleColour};">Client:</strong>
</td>
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;">
$issue.getCustomFieldValue("customfield_10021").getValue()
</td>
</tr>
#end
email returned
|
||||||||||||||||||||
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you try $issue.getCustomFieldValue("customfield_10021").join(", ") instead of ...getValue()?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this didnt work either entered
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;">
$issue.getCustomFieldValue("customfield_10021").join(", ")
</td>
|
||||||||||||||||||||
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, now you got me :-) I will try it by myself and get back.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok... you could use something like this to get rid of the brackets:
#set ($mylisttext = $issue.getCustomFieldValue("customfield_15090").toString()) #set ($mylength = $mylisttext.length() - 1) $mylisttext.subSequence(1,$mylength)
Henning
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.