You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I would like validate the creation time of a ticket for action A or B in JQL when ticket is create.
I founded {{now.convertToTimeZone("America/Montreal").shortDateTime}} gives me the date time at the moment and it's look like : 9/20/23, 3:19 PM
I would like to create a IF in JQL that validate if ticket creation time is between 8h00 and 16h00 and the day is from monday to friday.
Somebody can show me how can I extract the time and the day of week to compare?
Thanks,
Hello @Harold Levasseur
Welcome to the Atlassian community.
If you reference the Format section of this document:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#--
...it provides a link to additional formatting commands at
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
Using that information you will find that you can extract the day-of-week from a date/time field using .format("E")
{{now.convertToTimeZone("America/Montreal").format("E")
You can extract the hour, 0-24, using "H".
{{now.convertToTimeZone("America/Montreal").format("H")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad I could help.
If your problem has been solved please consider clicking the Accept Answer button.
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.