Hello, I am working on an automation rule using smart values. I am trying to check if a date is after another date, and then use the result of that comparison in an or operator. However, every time I use the result of .isAfter in a conditional check, it acts as if it is false, not true.
If log the result of {{issue.sprint.endDate.isAfter(issue.Target End.toDate)}} I get true
However if I log the result of {{equals(issue.sprint.endDate.isAfter(issue.Target End.toDate), true)}} I get false.
I am not sure why true does not equal true? Per the documentation it returns the value true, not a string of true, but I tired a string comparison and that returns false as well.
My ultimate goal is to see if target end is NULL OR if target date is before the date of the issues sprint end.
{{or(equals(issue.Target End, NULL), issue.sprint.endDate.isAfter(issue.Target End.toDate))}}
Maybe equals doesn't recognize booleans?
Cause I think it might work without having to explicitly evaluate for true?
{{#if(or(issue.Target End, NULL), issue.sprint.endDate.isAfter(issue.Target End.toDate))}}YUP{{/}}
I tried using isAfter with IF, and it never evaluated true and ran what was in the if.
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.