Hi,
I'm working on Automation rule, and I want to make sure a task belongs to the currently running sprint.
I have a {{issue.sprint.startDate}} and {{issue.sprint.endDate}}, and I want to compare it with {{now}}
Now the problem is that {{now.isAfter(issue.sprint.startDate)}} always return nothing (null I guess).
The only reason I can think of - `startDate` is not a date type, so I was trying to cast it to date with no success.
Please suggest how to compare `startDate` and `now`?
Here is the tests I done:
With no Formatting:
start Date: {{issue.sprint.startDate}}
now: {{now}}
now is before now: {{now.isBefore(now)}}
now is before start Date : {{now.isBefore(issue.sprint.startDate)}}
With .toDate
start Date: {{issue.sprint.startDate.toDate}}
now: {{now.toDate}}
now is before start Date : {{now.isBefore(issue.sprint.startDate.toDate)}}
With .jiraDate
start Date: {{issue.sprint.startDate.jiraDate}}
now: {{now.jiraDate}}
now is before start Date : {{now.isBefore(issue.sprint.startDate.jiraDate)}}
With .jiraDate.toDate("yyyy-MM-dd")
start Date: {{issue.sprint.jiraDate.toDate("yyyy-MM-dd")}}
now: {{now.jiraDate.toDate("yyyy-MM-dd")}}
now is before start Date : {{now.isBefore(issue.sprint.jiraDate.toDate("yyyy-MM-dd"))}}
------
With no Formatting:
start Date: Thu Dec 16 09:59:02 UTC 2021
now: 2021-12-23T16:29:20.0+0000
now is before now: false
now is before start Date :
With .toDate
start Date:
now:
now is before start Date :
With .jiraDate
start Date: 2021-12-16
now: 2021-12-23
now is before start Date :
With .jiraDate.toDate("yyyy-MM-dd")
start Date:
now: 2021-12-23T00:00:00.0+0000
now is before start Date :