Check custom field value in custom email template

Arianna Fabbri August 12, 2015

Hi,

I'm trying to implement a custom email with grooy script runner plugin as a post function on a workflow transition.

I would like to insert in the email a logo, this logo should be different based on a custom field selection.

How can I check the custom field value and, based on its value, select the right logo path?

 

Thank you in advance

Regards

Arianna

1 answer

1 accepted

3 votes
Answer accepted
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.
August 13, 2015

Hi Arianna,

You could use something like this as your template:

<% if (issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("textfield")) == "logo") { %>
use logo1
<% } else {%>
use logo2
<% }%>

You can also find some documentation here: https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-Sendacustomemail

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events