Hello Atlassian Community!
I want to create Automation which sends e-mail to certain user with all the comments from the work item added after the date saved in custom field.
I created date-time customfield_11982, which is currently Mar 08, 2026, 8:55 PM (2026-03-08T19:55:19.4+0000).
Five comments were added after this date and time but no comment is sent by e-mail.
My current smart values in automation looks like this:
{{#issue.comments.reverse}}
{{^author.displayName.equals("Automation for Jira")}}
{{#if(created.jiraDateTime.isAfter(issue.customfield_11982.jiraDateTime))}}
[{{author.displayName}} ({{author.emailAddress}}) - {{created.format("dd-MM-yyyy HH:mm")}}]:
{{body}}
-----------
{{/}}
{{/}}
It works properly when instead of "issue.customfield_11982.jiraDateTime" there is for example now.minusHours(4).
Hello @Dominik Kaźmierski
I think the problem is here: issue.customfield_11982.jiraDateTime
isAfter() compares date objects, but .jiraDateTime formats the value as text. That would also explain why now.minusHours(4) works, because that is still a real date value. Atlassian’s smart value docs show isAfter() being used directly with date fields, not with formatted text.
Hi !
Thank You for your answer.
Do You have any ideas how to compare those two values then?
I tried using created.gte(issue.customfield_11982), created.jiraDateTime.gte(issue.customfield_11982.jiraDateTime) and created.toDate.isAfter(issue.customfield_11982.toDate) - it doesn't work as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, I would try it without .jiraDateTime.
So I would test:
{{#issue.comments.reverse}}
{{^author.displayName.equals("Automation for Jira")}}
{{#if(created.isAfter(issue.customfield_11982))}}
[{{author.displayName}} ({{author.emailAddress}}) - {{created.format("dd-MM-yyyy HH:mm")}}]:
{{body}}
-----------
{{/}}
{{/}}
{{/}}
If that still does not work, I would add a Log action first and print both values, just to verify the field is really available in the rule in date format.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I tried {{#if(created.isAfter(issue.customfield_11982))}} already and it doesn't work.
I also added Log actions and it seems that fields are available as date formats:
But it seems not to work in "send e-mail action" while iterating through all the comments (deleted {{^author.displayName.equals("Automation for Jira")}} for now, just to be sure, that it doesn't interfere with the rest).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please paste Screenshot from entire Automation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.