Forums

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

Issue with creating an if-else rule on a date comparison condition.

Michael Cohen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 22, 2022

In automation rules, I am trying to compare two date fields ("Due date" and a custom field) in order to set a third one (also custom, and drop-down, field).

In my "if" block, in the "advanced compared condition", I have tried things like comparing:

  • {{issue.customfield_X.diff(issue.duedate).minutes}} to 0
  • {{issue.customfield_X.toDate.diff(issue.duedate).minutes}} to 0
  • {{issue.customfield_X}} to {{issue.duedate}}
  • etc.

(where X is the id of my custom field, retrieved via the API)

But when changing the value of my date custom field on the ticket (before and after the Due date), I always get the same outcome.

Looking at the audit logs, the status is always "success", but the outcome of the block remains the same.

Anything I am missing in my comparison?

Thanks in advance!

1 answer

0 votes
Kian Stack Mumo Systems
Community Champion
July 22, 2022

@Michael Cohen, I was able to get mine working like this:

 

Screen Shot 2022-07-22 at 2.03.25 PM.png

Suggest an answer

Log in or Sign up to answer