Get FullName from actorRole Edited

Is it possible to add to this code in order to retrieve a full user name (i.e. John Smith) as well as their username, from getting the Actor Roles?

 for(Project projectarray in projectArray){
for(ProjectRole projectrole in projectRoles){
def actorRole = projectRoleManager.getProjectRoleActors(projectrole, projectarray)  //projectLead = projectarray.getProjectLead()
if(actorRole.getUsers().toArray().size() >= 1){
file
.append( "" + projectarray.getKey() + "_" + projectrole.getName() + " " + "= " + actorRole.getUsers().toArray() + "\n")
}
else if(actorRole.getUsers().toArray().size() < 1){ }

 

 

1 answer

This widget could not be displayed.
Alexey Matveev Community Champion Jan 17, 2018

It would be something like this

actorRole.getUsers().each{it.getDisplayName()} 

hmm, doesn't appear to work. 

Nothing gets returned when I use this function.

Alexey Matveev Community Champion Jan 17, 2018

What do you want to return? There will be an array of full user names not a singe full user name. Do you want to return an array?

yes, currently I'm able to just return the username i.e. bob123, which is concurrent with the project actoRole, however, I would like to get the Full Name too. 

i.e. [bob123] [Bob Smith] 

Any ideas please..? :) 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

169 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you