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

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events