I know you can get custom fields to be sent in an outgoing email. Can you get custom User properties to be sent in outgoing emails?
Example under User ABC I created
Key - Phone
Value - 111-111-1111
I want to send this information in the issueassigned.vm when the issue triggers an Assigned Issue.
Community moderators have prevented the ability to post new answers.
Please follow the below link
https://stackoverflow.com/questions/9872675/how-to-escape-in-velocity-silent-notation
You need to check whether the UserPropertyManager#getPropertySet(User) exists in the velocity context or not. If yes, you can use the below method:
UserPropertyManager#getPropertySet(User).get("phoneExt")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the quick reply... I would like to see if I have the formating set properly in the vm -
#disable_html_escaping()
#if ($UserPropertyManager#getPropertySet(User).get("Phone"))
<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};">#text("Phone Number"):</strong>
</td>
<td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;">
$UserPropertyManager#getPropertySet(User).get("Phone")
</td>
#end
</tr>
When I include this new.vm in the issueassigned.vm I get an error -
An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: ------- org.apache.velocity.exception.ParseErrorException: Encountered "#getPropertySet" at templates/email/html/includes/fields/phonenum1.vm[line 2, column 26] Was expecting one of: <RPAREN> ... <WHITESPACE> ... "-" ... "+" ... "*" ... "/" ... "%" ... <LOGICAL_AND> ... <LOGICAL_OR> ... <LOGICAL_LT> ... <LOGICAL_LE> ... <LOGICAL_GT> ... <LOGICAL_GE> ... <LOGICAL_EQUALS> ... <LOGICAL_NOT_EQUALS> ... <DOT> ... at org.apache.velocity.Template.process(Template.java:141) at
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.