Forums

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

Get FullName from actorRole

Daniel Burke January 17, 2018 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 votes
Alexey Matveev
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.
January 17, 2018

It would be something like this

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

Daniel Burke January 17, 2018 edited

hmm, doesn't appear to work. 

Nothing gets returned when I use this function.

Alexey Matveev
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.
January 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?

Daniel Burke January 17, 2018

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] 

Daniel Burke January 18, 2018

Any ideas please..? :) 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events