Hi community,
I've got a date picker on a portal form where I want to display an error message if it's past 3pm on the same day.
After several unsuccessful attempts using a ScriptRunner behavior I'm now trying to configure the requirement using Jira Workflow Toolbox.
In the workflow's "Create" transition I set up a JWT Logical Validator with the following expression: datePart({issue.cf13310}, LOCAL) = datePart({system.currentDateTime}, LOCAL) ? !(hour({system.currentDateTime}, LOCAL) >= 15) : false
I figured out that the validator must return false in order to show the error message. Hence I check if the current hour is greater or equal 15 and invert that.
However, this does not work at all. Can somebody help?
Try using the following expression instead:
datePart({issue.cf13310},LOCAL) = datePart({system.currentDateTime},LOCAL) AND hour({system.currentDateTime}, LOCAL) < 15 OR datePart({issue.cf13310},LOCAL) != datePart({system.currentDateTime},LOCAL)
Please let me know if this expression gave you the expected results.
Kind regards,
Iheb Kharab
Decadis AG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.