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, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events