Compare Date Custom Field to Current Date and Time
Issue #18
resolved
I want to compare a date customfield to current date - it has to be filled with the date today or a future date.
but if i compare %{mydate} >= %{00057}, it will only let me pass, if i use a future date. the today-date does not work.
Comments (3)
-
repo owner -
repo owner - changed status to resolved
-
repo owner In version 2.1.16 of JIRA Workflow Toolbox validator "Validation based on mathematical or date-time expression" has been renamed to "Boolean validator with math, date-time or text-string terms".
- Log in to comment
I suppose you are using validator "Validation based on mathematical or date-time expression" (renamed in version 2.1.16 to "Boolean validator with math, date-time or text-string terms"). In that case, field code format is {00057} instead of %{00057}, i.e., it doesn't use '%'.
You also must know that fields {00057} and {mydate} are composed by a date part and a time part. The comparison takes into account both parts. If you want to compare only the date part, you have to use function datePart(date, timezone), as shown in the screenshots:
Once configured, transition looks like this: