Hey folks I need your help, I guess it is a simple question.
I use Scriptrunner to send emails to assignees and this works well. I send the email with this line of code:
sendEmail(emailAddr, emailSubject, emailBody)
But know I dont want to send it to the assignee (assignee.getEmailAddress()), I want to send it to a user, that is selected via a customfield, which is a user picker.
When I write:
def user = issue.getCustomFieldValue(customFieldManager.getCustomFieldObject(10414))
emailAddress = user.getEmailAddress()
I receive an Error because jira things of it as an object and not as an user. how can I change that?
Best