The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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 Champions.
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

4 votes
Answer accepted
Marc -Devoteam-
Community Champion
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 Champions.
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
TAGS
AUG Leaders

Atlassian Community Events