I would like to display username and full name of an user picker field in Built-In Scripts custom email. If I use:
<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Team Lead")) %>
I get username twice: username(username)
Also I would like to display the full name of the user in my custom user picker field.
Any suggestions?
Hi,
Try this out.
<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Team Lead")).getDisplayName() %>
Vijay
Thank you, full name works perfectly!
Do you know, why I get the username twice?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not sure why it writes two times the name. I think its the user_name (user_name_lower)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right method for user name:
<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Name")).getName() %>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where we need to write this code to get full name in the field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Where we need to write this code to get full name in the field?
Kindly reply
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.