The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

get email from user picker field

Sergio Palacio
Contributor
January 22, 2020

Hi community.

I'm using scriptrunner to get the email from an user picker

I Tried.


def employee_no = customFieldManager.getCustomFieldObject("customfield_10147")
def employee_no_value = issue.getCustomFieldValue(employee_no).getUserValue().email

But I'm getting error.

It is possible get the email adress from an user picker?

thanks.

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Sergio Palacio
Contributor
January 22, 2020

ApplicationUser employee = (ApplicationUser)issue.getCustomFieldValue(employee_no)
def user_mail = employee.getEmailAddress()

kukabgd
February 22, 2021

Thanks, this solution worked great for me. :)

Like Sergio _ likes this
Loganayaki
December 28, 2022

It's worked for me !

Like Sergio _ likes this