Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Using inline conditional logic in email action


I am trying to create a system that gathers weekly data and builds a report to send out in a weekly email. I am using the schedule trigger for every 7 days with a JQL search condition that returns a list of items that have been updated in the last week to a send email action. The goal is to have two lists: One for items that have been created in the last week, and another for items that have been updated in the last week. 

In the body of the email action, I have been attempting to use if statements to parse out items from the list and display them in the desired fashion. However, I have not been able to get the if statements to function. I have found contradictory information on this site for how to format the if statements. Here is what I have at the moment:

<a href="{{toURL}}">{{key}}</a> was created on {{created.shortDate}}
Updated on {{updated.shortDate}} at {{updated.shortTime}}
Assignee: {{assignee.displayName}}
Status: {{}}

I have tested with several different conditions, including ones that should always return true, without luck, even though the rest of the message executes properly. One comment I found suggested putting spaces in front of the #if and / characters, but that seemed to make the if statement execute every time even if the condition was untrue.

Any suggestions on how to fix my formatting to get these statements to work would be much appreciated. 

Note: I am not using Jira Cloud, if that matters

2 answers

0 votes
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 19, 2021

Hi there @Braxton Wilkinson

Developer from Automation here.

Looking at your inline if condition the problem isn't with the if condition itself but the comparison functions you are using for date fields. gt/lt are not supported in date fields you would either have to convert to number format like days, or just use either isAfter or isBefore.

You can see a list of date functions here:

My suggestion is to setup a manual trigger for your rule to test and use a log action with the if condition to see what's being returned inside that if block. Something like this should work for your rule: {{#if(created.isAfter(now.minusBusinessDays(5)))}}

If you require further help with this rule you can get in contact with Atlassian support:

Hope this helps.

0 votes
Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 15, 2021

Hi @Braxton Wilkinson 


Welcome to the Atlassian community.

My (very simple) suggestion would be to separate them out into 2 rules/emails.

But beyond that, this may prove helpful: Solved: Can conditional operators be used in emails create... (

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events