Forums

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

How to convert string value into ApplicationUser format

Andrew Striletskyi
Contributor
October 24, 2018

Hi folks

 

I have a simple question: how to convert string value with username into ApplicationUser. I need to use setAssignee method. I get value of username from file and my function return this value as a string ? But setAssignee method requires ApplicationUser value. How to do that?

1 answer

1 accepted

1 vote
Answer accepted
Elifcan Cakmak
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.
October 24, 2018

Hello,

You can use userManager to get application user like this:

def userManager = ComponentAccessor.getUserManager()

def user = userManager.getUserByName("username")

Check out the documentation of usermanager here:

https://docs.atlassian.com/software/jira/docs/api/7.0.7/com/atlassian/jira/user/util/UserManager.html

Regards,

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