Forums

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

Member name field - what is the unique value

Dan27
Contributor
July 19, 2018

Hi,

I would like to find the unique name for "member name" field.

In some places it written differently.

Cohen Moshe

mcohen

mcohen(Cohen Moshe)

and else..

 

Thanks,

Daniel

2 answers

0 votes
Mark Markov
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.
July 19, 2018

Hello @Dan27

def userpickr = issue.getCustomFieldObject(userPickerField)

returns you ApplicationUser object for user.

Here described methods that you can use to receive info.

FYI getDisplayName() may be not unique, because you may have people with same first name and surname.

I would recommend use

userpick.getKey()

This is returns you unique key for user.

Dan27
Contributor
July 19, 2018

Thank you, which value insert into userPickerField ? id? name? key?

Mark Markov
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.
July 19, 2018

ApplicationUser itself :)

Dan27
Contributor
July 19, 2018

Capture.PNGI don't understand :(

Mark Markov
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.
July 19, 2018

What are you trying to achieve?
Can you please provide full case scenario.

Dan27
Contributor
July 19, 2018

I want to get the unique key for all the different names of one member..

0 votes
Nic Brough -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.
July 19, 2018

What type of field is this "member name"? 

Also. I am misunderstanding the question.  You seem to be talking about the content of it rather than the name of the field.  Are you asking about the field or the content?

Dan27
Contributor
July 19, 2018

User Picker (single user)

 

I need the content of this field, I have one member that called in a different member name, like:

Cohen Moshe

mcohen

mcohen(Cohen Moshe)

 

I want to take only the unique name of this member.

Nic Brough -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.
July 19, 2018

Ok, so you have three entries in this user picker for one person?

That means they have three accounts which match the rules the user picker is using to select them.  I would work out which account they actually use, and disable the other two (although you could just amend them so they no longer match the user-picker rule that selects them)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events