The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to display user ID and full name of user picker?

Tatiana Jancusova
June 22, 2014

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?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

3 votes
Answer accepted
Vijay Khacharia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 22, 2014

Hi,

Try this out.

<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Team Lead")).getDisplayName() %>

Vijay

Tatiana Jancusova
June 22, 2014

Thank you, full name works perfectly!

Do you know, why I get the username twice?

Vijay Khacharia
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 22, 2014

I am not sure why it writes two times the name. I think its the user_name (user_name_lower)

Tatiana Jancusova
June 22, 2014

Right method for user name:

<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Name")).getName() %>

Kapil Agarwal
September 10, 2015

Where we need to write this code to get full name in the field

Like Graham Twine likes this
0 votes
hemalathacg
March 29, 2019

Where we need to write this code to get full name in the field?

Kindly reply