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

0 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

708 views 6 13
Read article

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