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: 

Body Email with Scriptrunner in Jira Data Center

Luis Angel Valencia
August 2, 2024

Hi Community, 

 

 

Currently I´m using this  line in my body mail to set the "custom_field" value <% out << issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("MyFieldName")) %> 

I want to set another custom field but in this case of "User Picker" type.

 

Do you know how can I set it?

 

Regards.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Tomasz Kowalczyk
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 Champions.
August 5, 2024

You can do the same but on the end try do get Display Name of user.
So you can achieve this by this line of code
<% out << issue.getCustomFieldValue(com.atlassian.jira.component.ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("MyFieldName"))?.getDisplayName() %> 

it will work on single user picker. If you have multiple values in this picker then it will be a little bit more complicated. 

0 votes
Bhanu
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 Champions.
August 2, 2024

Hi @Luis Angel Valencia

Welcome to the community!

Please share some details on what module you are using from script runner to get some insight into what you are trying to achieve?

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events