JQL: How to find issues created in non-working hours?

Todor Kostadinov May 30, 2014

Hi, any way to find issues that are created this month in non-working hours?

For example, find all issues creted after 19:00, and all issues created in Saturday and Sunday.

And all this in jql filter?

Or with mysql query?

7 answers

1 vote
Fernando Ducloux June 9, 2015

well this works.. but it's a slow query..

createdDate >= startOfDay(-8h) AND createdDate <= startOfDay(8h) OR createdDate >= startOfDay(-32h) AND createdDate <= startOfDay(-16h) OR createdDate >= startOfDay(-56h) AND createdDate <= startOfDay(-40h) OR createdDate >= startOfDay(-80h) AND createdDate <= startOfDay(-64h) OR createdDate >= startOfDay(-104h) AND createdDate <= startOfDay(-88h) OR createdDate >= startOfDay(-128h) AND createdDate <= startOfDay(-112h) OR createdDate >= startOfDay(-152h) AND createdDate <= startOfDay(-136h) order by createdDate DESC

seems to be the only way..

 

Katarina Nikolic April 4, 2017

Dear Fernando, do you maybe found some other way for creating the report with tasks which is created at non-working hours?

 

Thanks,

Regards,

Katarina

fiorellasantopietro July 21, 2017

Hi Fernando,

as far as I can see the startofDay() function works just for the current day (the same for endofDay() ). Am I wrong?

I'd like to find a solution in order to consider a different SLA if the ticket is created on work hours or not-working hours. 

 

Thanks in advance,

Fiorella

1 vote
Fernando Ducloux June 9, 2015

Hi @Todor Kostadinov, i'm looking for the exactr same thing.. I was wondering if you had any luck

 

thanks!

1 vote
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2014

You will need to generate a script that creates the JQL strings and either cut and paste them or create filters.

The following JQL deals with the weekend (ie anything created after 5 pm friday through sunday)

project = JIRA and created >= "2014/05/30 17:00" AND created < "2014/06/02"

0 votes
Todor Kostadinov June 9, 2015

No, sorry.

Katarina Nikolic April 4, 2017

Dear Todor, do you maybe found a way for creating the report with tasks which is created at non-working hours?

 

Thanks a lot,

Regards,

Katarina

0 votes
Todor Kostadinov June 1, 2014

Hi Norman,

and thank you for the reply.

I need more global solution, for example to be able to specify only the month, and to to create report for all issues created during weekends and in after-working hours. I think that I'm able to create sting in JQL for all weekends in a given month, but I just need more general solution.

0 votes
Todor Kostadinov June 1, 2014

Hi Norman,

I know they are not the same.

I preffer JQL.

0 votes
Todor Kostadinov May 30, 2014

SELECT * FROM jiradb.jiraissue

where HOUR(CREATED) > '19:00'

This is in mysql for the hours, but waht about the weekends?

Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 30, 2014

Did you want JQL or SQL? They are not the same.

Like Sergei Gridnevskii likes this

Suggest an answer

Log in or Sign up to answer