Forums

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

Display scripted field values in custom email post function

Melissa Bay February 25, 2015

Is there a way to display scripted field values within an email that is created via "Send Custom Email"  built in post-function? 

I currently have  the below code for my custom scripted field, however it always displays as null in the email. (The field does populate correctly when viewing/updating the issue.)  Can I pull this in the email somehow even though the field is calculated on the fly?

 

<% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("My Script Field"))

4 answers

0 votes
Alejo Villarrubia [Adaptavist]
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 Leaders.
March 2, 2015

Hi @Melissa Bay , I reproduced the issue and it has been logged here: https://jamieechlin.atlassian.net/browse/GRV-652.

0 votes
JamieA
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 Leaders.
February 27, 2015

I think we reproduced this... I'll get back to you.

0 votes
Melissa Bay February 26, 2015

It is a "Script Field" type that is setup as a Number Field with a Number searcher. My understanding is that this type is calculated on the fly instead of being stored in the database.

0 votes
Alejo Villarrubia [Adaptavist]
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 Leaders.
February 26, 2015

What is the type of that custom field you are using? I've just tried your line of code with a basic Text Field and it works fine for me.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events