Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Multi user picker - full name in output/input

Lukáš Maruniak August 18, 2011

Hi,

I need to implement CustomField which acts as Multi User picker, but instead of displaying usernames, it should display FullNames.

Does anybody know how to do this ??

Thanks in advance

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Wayne Grebe November 6, 2012

I'm brand new to Jira and am not a developer-type. Where would code like this go to manipulate the appearace of the name to display Full Name rather than Username?

Thanks for the help!

0 votes
J Thomas
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 Leaders.
August 18, 2011

Are you sure that $value is a collection of User objects? $selectedValue would need to be a User for .fullName to work.

If it isn't you'll need to modify the custom field to provide you User objects instead of (or as well as) user name strings. (You could add a parameter containing a collection of Users in getVelocityParameters().)

Lukáš Maruniak August 23, 2011

Maybe I gave you not exact explanation. The problem is that the usernames appear when I enter input / for example I type John Doe - and in textarea appear his username (for example J123). I need to display his fullName. So I think I have to extend javascript functionality. AM I right ?

J Thomas
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 Leaders.
August 23, 2011

When I fill in a user picker field I get "John Doe (jdoe)". I select the user I want and the field on the edit screen shows "jdoe" but when I save the issue and view it then on the view screen the field is displayed as "John Doe".

JIRA's user picker fields save the user name not the full name so on the edit screen you see user name but everywhere else (when viewing the issue or in the Issue Navigator) you will see full name.

If you want to save the full name in the database you'll have to create your own user picker implementation that looks up the user from the full name not the user name.

0 votes
Jobin Kuruvilla [Adaptavist]
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 Leaders.
August 18, 2011

You can extend the Multi user Picker custom field and modify the edit/view templates to show full name instead of user name.

Lukáš Maruniak August 18, 2011

Thx I tried something like this: but it gives me no result >

#set ($userString = "")

#if ($value)

#foreach ($selectedValue in $value)

#if ($userString == "")

#set ($userString=${selectedValue.fullName})

#else

#set ($userString="${userString}, ${selectedValue.fullName}")

#end

#end

#set($customUserString="<span >$userString</span>")

#end

Basiclly don't know how to access fullName property.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events