How do you evaluate a cascading field for empty in an automated email template

Tom Scoggin
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.
January 7, 2025

I have an email template that needs to show a cascading fields value if not empty. I've tried {{#if not(issue.fields.customfield_12909.value.isEmpty)}} or just {{#if issue.fields.customfield_12909.value}} and neither evaluates to true or false. I can add the field data to the email using {{issue.fields.customfield_12909.value}} - {{issue.fields.customfield_12909.child.value}} so I know it works in the email but it will just not evaluate in an #if statement.

Looking forward to any help.

1 answer

1 accepted

4 votes
Answer accepted
Marc - Devoteam
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.
January 7, 2025

Hi @Tom Scoggin 

What if you would use:

{{#if(issue.customfield_12909.value.isNotEmpty()) }}
issue.customfield_12909: {{issue.fields.customfield_12909.value}} - {{issue.fields.customfield_12909.child.value}}
{{/}}

Tom Scoggin
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.
January 7, 2025

That worked. Thanks!

Note: Just before you provided this, I was able to also perform this by creating a variable for the cascade field and evaluate against the variable. See below.

Capture.PNG

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events