Forums

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

Specified tickets outside of business hours for the entire month

Harut Avetisyan December 25, 2023

Greetings everyone,

I am seeking to obtain tickets with high priority that were created (or it's priority was changed to hight) during non-working hours throughout the entire month (from 6 PM to 10 AM each day). For example,

1. If a ticket was created on 2023/12/20 at 15:33 and its priority was changed to high on 2023/12/21 at 18:00, it should be included in the JQL.

2. If a ticket was created on 2023/12/16 at 12:05 and its priority was changed to high on 2023/12/21 at 13:00, it should be included in the JQL.

It's important to note that Saturdays and Sundays are not considered business days, and the JQL should include tickets with high priority that were opened or had their priority changed on non-business days as well.

2 answers

0 votes
Bill Sheboy
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.
December 27, 2023

Hi @Harut Avetisyan 

I do not believe that type of query is supported with the built-in features of JQL.

Your possible work-arounds depend upon how frequently you need to do this type of query and your willingness to spend money:

  • need this one time
    • Export the issues to a spreadsheet and perform the additional filtering on non-working hours / days there
  • need this often, and have money to spend
    • Investigate marketplace addons to add this type of search capability to JQL
  • need this often, and do not have money to spend
    • Consider adding a custom field to indicate when issues are created during business hours (or the opposite), use an automation rule to calculate and set the field, and then use the built-in JQL features to perform your search.  This approach would work for issues created after the rule is enabled.  To set the field for older issues a scheduled trigger rule could be used to update the older items.

 

Kind regards,
Bill

0 votes
abhishek_sharma03
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.
December 25, 2023

Hi @Harut Avetisyan Please try the below -

project = "XXXXX" AND priority = High AND (created >= startOfDay (-30d) AND created <= endOfDay(-1d) )

Harut Avetisyan December 26, 2023

Dear @abhishek_sharma03

Thank you for your response. However, the mentioned JQL will return tickets with High priority for the entire month(if the JQL is used on 28.12.2023, it will return tickets from 28.11.2023 to 28.12.2023, but that's not the desired outcome). I specifically need tickets where the priority was changed to High during non-working hours (from 18:00 to 10:00), including Saturdays and Sundays, as they are non-business days, for the entire month.

Suggest an answer

Log in or Sign up to answer