How to add a text custom field value to custom email [script runner postfunction]

Hi,

I'm having trouble with adding a custom field value to the email template using the script runner "Send a custom email" post function.

I entered this in to the template:

$issue.getCustomFieldValue("customfield_10008")

but it's not working...

Thanks for the help,

Rad

2 answers

1 accepted

0 vote

Covered in the docs: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Sendacustomemail

See the template, and the javadoc for CustomFieldManager.

Hey there,

use the following

${cfValues['customfield_name'] ?: ""}

 

You can find answers to your questions in Jamie's plugin page

https://scriptrunner.adaptavist.com/4.3.6/jira/builtin-scripts.html#_send_a_custom_email

Hi Kostas,

thanks for the answer. Is it somehow possible, to use the customfield id?

Rad

Not sure about that. I think it should be possible. Have a look at the link i send you for the syntax.

Cheers

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 2 hours ago 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...

17 views 0 1
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