Comparing date field with current date

I have a workflow in which I want to clear one field if the due date field is set to today or later. I first tried a construct like this:

rule foo 
 
when issue.Due date.changed && issue.Due date >= now { 
[...]
prettyPrint();

But that only works for future dates. I found that this works:

rule foo 
 
when issue.Due date.changed && issue.Due date > now - 1 day { 
[...]
prettyPrint();

Is that the best way to do this?
2 comments
Comment actions Permalink
Yes, because 'now' is the current timestamp, but not only the today date.
0
Comment actions Permalink
That's what I figured. Thanks for clarifying!
0

Please sign in to leave a comment.