Compare 2 date time picker with current date
Issue #816
resolved
The issue has: Date Time picker 1: Start Date Date Time picker 2: End Date.
Subtask has: Date Time picker3: Executed Date
When the user creates the issue, how do I create JWT validator in the Create transition that "Start Date" must be at least 15 minutes later than the current time. Same thing, the End Date must be at least 15 minutes later than Start Date.
For subtask, how do i make sure that "Executed Date" already in the range of "Start Date" and "End Date"?
Thx
Comments (2)
-
repo owner -
repo owner - changed status to resolved
I close the issue, please reopen it if you find that provided solution is not satisfactory.
- Log in to comment
Hi @chaunguyen1997,
You can implement the 3 validations using "Boolean validator with math, date-time or text-string terms" with the following boolean expressions:
"Start Date" must be at least 15 minutes later than the current time:
{sssss} > {00057} + 15 * {MINUTE}
"End Date" must be at least 15 minutes later than "Start Date":
{eeeee} < {sssss} + 15 * {MINUTE}
"Executed Date" in the range of "Start Date" and "End Date":
{sssss} <= {xxxxx} AND {xxxxx} <= {eeeee}
replacing sssss with field code for Start Date, eeeee with field code for End Date, and xxxxx with field code for Executed Date.
Note that the 3 fields should be Date-Time Pickers, i.e., they should also consider the time part.