Display scripted field values in custom email post function

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

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.

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 vote

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

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

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you