Forums

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

Unable to get emailAddress from ScriptRunner User Picker custom script field in Jira Automation Rule

Alfira August 21, 2025

Hello,

In ScriptRunner Fields I created Custom Script Field with User Picker (single user) template.

Field just returnes the user from the other field:

def user = issue.getCustomFieldValue("Custom Field Name")

if (user) {

    return Users.getByKey(user)

}

UserPickerField.png

 

When I try to get email address of the user from this field in ScriptRunner Console, it works correctly:

Issues.getByKey("issue-key").getCustomFieldValue("Custom User Picker Field").emailAddress
But when I try to get email address in Jira Automation Rule, it returns nothing.
I printed the field value into the log in Jira Automation:
UserPickerFieldValueInJiraAutomation.png
It prints "{active=true}" instead of ApplicationUser info.
At the same time standard Jira User Picker fields work as expected in Jira Automation.
Is there any way to get emailAddress and other user info from the ScriptRunner User Picker Custom Script Field in Jira Automation?

1 answer

1 accepted

1 vote
Answer accepted
Alfira August 22, 2025

I figured it out. Automation Rule was based on JQL search. Then from the issues, found by JQL in Automation Rule, I tried to get email address from the Custom User Picker Script Field. And it's known behaviour - script field values are available in search results only after the re-index of issues. So, it was just needed to re-index the project/Jira.

Now I get all the required data including emailAddress from the Custom User Picker Script Field in Jira Automation. Everything works as expected without any issues.

Suggest an answer

Log in or Sign up to answer