i am trying to set Assignee value from custom type user field , but i am getting value in XXXXX(XXXXX) format.
When i am trying to set the value using issue.setAssignee() i am getting null value.
def log = Logger.getLogger(" ")
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
UserManager userManager = ComponentAccessor.getUserManager();
def managerId = customFieldManager.getCustomFieldObjectByName("Dept Approver's(Manager) Id")
String managerIdvalue =issue.getCustomFieldValue(managerId)
ApplicationUser Mgruser = userManager.getUserByName(managerIdvalue)
log.info "managerId: "+managerId
log.info "managerIdvalue: "+managerIdvalue
log.info "Mgruser : "+Mgruser
2017-08-09 10:50:20,455 INFO [ ]: managerId: Dept Approver's(Manager) Id 2017-08-09 10:50:20,456 INFO [ ]: managerIdvalue: 44018514(44018514) 2017-08-09 10:50:20,456 INFO [ ]: Mgruser : null
issue.setAssignee(Mgruser) --> should assign the value of "Mgruser " into Assignee.
but "Mgruser" is getting null value.
please advise how to get username from coustomfield and set it to Assignee default field.
The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...
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!
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