The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation JQL IF Condition Against Specific Time

Devin Holland
November 20, 2023

Hi all,

I am currently trying to make an automation rule of the following:


If (issue.created) < 8:00 AM CST AND If (issue.created) > 5:00 PM CST

Then

Assign to (user)

Does JQL even have some kind of fuction where I can specify a time to check against? 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Tim Kopperud
Community Champion
November 21, 2023

Hi @Devin Holland, welcome to Atlassian Community. Yes Jira can check for specific time, though when specifying it by exact time you will need to add the date as well, as in syntax specs for searching date fields

Valid formats include: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd'

Based on your search statement I understand you are trying to fetch all issues created outside normal working hours independent of any specific dates. You might try something like this JQL: 

(created > startOfDay() and created < startOfDay("8h")) OR (created > endOfDay("-8") and created < endOfDay())

You don't need to use smart values (e.g. {issue.created}) into JQL filters, use plain field names. 

TimK

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events