Document toolboxDocument toolbox

How to split the tickets created in and after office hours in a report

Introduction

Do you want to know how many tickets are creating during the daytime and how many in the night time?

This is an example how to do it without having to modify the gadge configuration every day.
It will display the data for today and the previous 6 days.

Screenshot 2024-07-16 at 9.30.40 AM.png

The trick

You can use 2 JQL filters with the startOfDay() JQL function to filter on the created date field

Day

Start Hour

End Hour

Day

Start Hour

End Hour

Today

9

18

Yesterday

-15

-6

2 days before

-39

-30

3 days before

-63

-54

4 days before

-87

-78

5 days before

-111

-102

6 days before

-135

-126

project = SUPPORT AND ((created >= startOfDay(9h) AND created <= startOfDay(18h)) OR (created >= startOfDay(-15h) AND created <= startOfDay(-6h)) OR (created >= startOfDay(-39h) AND created <= startOfDay(-30h)) OR (created >= startOfDay(-63h) AND created <= startOfDay(-54h)) OR (created >= startOfDay(-87h) AND created <= startOfDay(-78h)) OR (created >= startOfDay(-111h) AND created <= startOfDay(-102h)) OR (created >= startOfDay(-135h) AND created <= startOfDay(-126h)))
  • startOfDay(-6h) will deduct 6 hours from the start of Today which is 0:00mn

    • - 6 hours will be 6pm the previous day.

  • Each row will deduct 24 hours to get the timing for the previous day

 

For night time hours (0000 - 0900 hrs & 1800 - 0000 hrs)

project = SUPPORT AND ((created > startOfDay(-6h) AND created < startOfDay(9h)) OR (created > startOfDay(-30h) AND created < startOfDay(-15h)) OR (created > startOfDay(-54h) AND created < startOfDay(-39h)) OR (created > startOfDay(-78h) AND created < startOfDay(-63h)) OR (created > startOfDay(-102h) AND created < startOfDay(-87h)) OR (created > startOfDay(-126h) AND created < startOfDay(-111h)) OR (created > startOfDay(-150h) AND created < startOfDay(-135h)))

 

Steps

  1. Add a Multiple Filters Line Chart Gadget (Weekly) gadget to your dashboard

    Screenshot 2024-07-18 at 10.13.30 AM.png

     

  2. Click Add Filter button since there are 2 series in the chart

     

  3. Fill in the JQL for the 1st filter

     

  4. Fill in the JQL for the 2nd filter

     

  5. Modify the other preferences accordingly

     

  6. Click on the Save button to apply the settings