Hi,
I am trying to create a JQL for tickets created from 15:00 today till 07:00 the next morning and it might be the December mode but what does the 15h mean in the JQL?
Does that refer to the time (15:00) or 15 hours added to the start of day time?
"created >= startOfDay(15h) AND created <= startOfDay(7h)"
Thank you.
Hi @Drishti Maharaj,
The number of hours between the parentheses is the number of hours you add to (or substract from) the start of today (0:00 this morning)
Your query - as you describe it in your title - does not make much sense, as issues can't have a created day that's in the future. It would be more logical if your plan is to search for issues that were created between 15:00 yesterday and 7:00 this morning.
That would be possible with the following statement:
created >= startOfDay(-9h) AND created <= startOfDay(7h)
where you count back 9 hours from midnight this morning and add 7 hours to midnight today.
Hope this helps!
Hi @Walter Buggenhout - this works lol thank you so much.
My brain is clearly in December mode but reading yours, would definitely work for the purpose that I was trying to achieve.
That JQL works when I tried it now on the query.
Thanks once again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Drishti Maharaj , the 15h is an offset from the startofday(). Since startofday() = 00:00 then in this case 15h does equate to 3pm or 15:00. With that said, your JQL doesn't really make sense. You can't find issue that will be created in the future. As written the JQL is effectively the same as created >= startOfDay(15h). So what is returned depends on when the query is run. If you run before 3pm nothing is returned. If run at 7pm then you will get issue created between 3pm and 7pm.
if you can further explain your goal I may be able to assist further.
cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jack Brickey - thank you for getting back to me.
So essentially they want that any tickets when created, and if they were created between 15:00 today and 07:00 tomorrow morning (standby times), then those specific tickets should be assigned to a particular user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, looking at your JQL it is more flawed than I initially stated. The results would always be empty. It is asking for issues created after 3pm AND before 7am so they contradict.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the 7am might be the issue...I think perhaps startofday was not right as it should be for the next day?
Not too sure if that is even possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you want to assign issue to a specific person when created between 3pm and 7am then create an automation rule like this...
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.