We would like to use the build-your-own validator to check if the current time is before 16:00 UTC and the printer selection is Day Print.
If its 16:00 or later, then we block the issue creation since Day prints are not possible after 16:00 UTC.
What is the syntax to check if the current time is after 16:00 in JMWE? We have tried the following with no luck
Validator
getUTCHours() < new Date(["16:00:00"])
Conditional Validation
!! issue.customfield_11947 && issue.customfield_11947.value == "Day Print"
If that's a Jira expression, then you can use following:
new Date().getUTCHours() > 16
Cheers
Thank you, this is what i was looking for, but just less than "<"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Julian Governale ,
See if this condition validation works for you:
!!issue.customfield_11947 && issue.customfield_11947.value == "Day Print" && new Date().getUTCHours() < 16
OR ELSE:
(issue.fields.customfield_11947 and issue.fields.customfield_11947.value == "Day Print")
and (issue.fields.created | date("HH", "UTC") | int >= 16)
Best regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the response, it was just 16 that I was looking for so marking your as accepted as this does work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.