You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I need to retrieve an project Actors Full Name (i.e Bob Smith), when iterating over project roles.
Currently I am able to use:
//Gets all of the projects, along with project roles (i.e. "developer" + username and full name, i.e. bed2scp Daniel Burke ENGIT_Developer)
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){
log.error("\r\n" + projectarray.getKey() + "_" + projectrole.getName() + "=" + actorRole.getUsers().toArray() + "" + "\n" + "\r\n")
However, this only retrieves the users username i.e. bed2scp
Ideally I would like to have both like: bed2scp Daniel Burke
I tried to use:
//Gets all of the projects, along with project roles (i.e. "developer" + username and full name, i.e. bed2scp Daniel Burke ENGIT_Developer)
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){
log.error("\r\n" + projectarray.getKey() + "_" + projectrole.getName() + "=" + actorRole.getUsers().toArray() + actorRole.getDisplayName() + "" + "\n" + "\r\n")
But this method is not valid.
Please help!
Hello,
getUsers is returning a set of ApplicationUsers. You need to go through that set and get the display name for each user. Something like this should work to get them:
def userNames = actorRole.getUsers()
def displayNames = userNames.each {it.displayName}
Let me know if this helps or if you have any other questions. :)
Jenna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I actually have to validate all data after migration. so basically my aim is to identify the lost data during migration using rest api and python
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.