Compare Date Custom Field to Current Date and Time

Issue #18 resolved
Former user created an issue

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)

  1. Fidel Castro Armario repo owner

    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:

    Post-function configuration.

    Once configured, transition looks like this:

    Post-function configuration.

  2. Fidel Castro Armario 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".

  3. Log in to comment