Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Validate ticket creation time in JQL

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,  

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 20, 2023

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")

It works well 

Thanks Trudy,

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 21, 2023

Glad I could help.

If your problem has been solved please consider clicking the Accept Answer button.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events