Email Conditional Formatting not working for me.

Brian Martinez April 12, 2024

Below is a template that I have for when stories are closed with missing information. I have an automation that triggers the email when the JQL finds that there is missing information. I am trying to only show items in the required section that are null, but in trying the conditional formatting I am not able to get it to work properly as the email comes back empty after the Required Fields text. 

 

The following {{issue.issuetype.name}} issue was updated to {{issue.status.name}} with missing requirements. Please review below.

 

<b>Assignee:</b> {{issue.assignee.displayName}}

<b>Summary: </b>{{issue.summary}}

<b>Status:</b> {{issue.status.name}}

 

<b><u>Required Fields</u></b>

{{#issues}}

{{#if(issue.customfield_12018.displayName.isEmpty)}}

<b>Dev Engineer:</b> is Empty{{/}}

 

{{#if(issue.customfield_12019.displayName.isEmpty)}}

<b>QA Engineer:</b> is Empty{{/}}

{{#if(issue.Story Points.isEmpty)}}

<b>Story Points:</b> is Empty{{/}}

{{#if(issue.customfield_12131.isEmpty)}}

<b>Business Unit:</b> is Empty{{/}}

{{#if(issue.ccustomfield_12020.shortDate.isEmpty)}}

<b>Requested Due Date:</b> is Empty{{/}}

{{#if(issue.components.name.isEmpty)}}

<b>Jira Components:</b> is Empty{{/}}

{{/}}

 

 

 

3 answers

1 accepted

0 votes
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 12, 2024

Hi @Brian Martinez 

Based on the documentation, I'd anticipate that isEmpty only works with certain field types 

I tested this (with a user picker, number field, and date field) using this syntax instead...

{{#if(not(exists(issue.Story Points.name)))}}
<b>Story Points:</b> is Empty{{/}}

...and it seemed to work :)

Ste

Brian Martinez April 15, 2024

This worked! Thank you for your help! 

Like Ste Wright likes this
0 votes
Kalyan Sattaluri
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.
April 12, 2024

Hello @Brian Martinez 

Are you in Cloud or Data Center?

If in cloud, and you need to send 1 email per issue, you dont need {{#issues}}. Please remove that and its ending paranthesis {{/}}.

 

Brian Martinez April 15, 2024

Thanks for your input. 

0 votes
Brian Martinez April 12, 2024

 

Here is the email I get. I am expecting all of the fields to show as empty since my test record was purposely left with empty fields. 

 

jira template.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events