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

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
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

412 views 0 3
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