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

r
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.
July 22, 2013

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

2 votes
Answer accepted
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.
July 23, 2013

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.

2 votes
Tsol
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.
July 22, 2013

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

r
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.
July 22, 2013

Hi Kostas,

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

Rad

Tsol
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.
July 22, 2013

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
TAGS
AUG Leaders

Atlassian Community Events