/build/static/layout/Breadcrumb_cap_w.png

K1000 - Report showing each closed ticket DATE Closed (dd/mm/yyyy) and time it took from opened to closed

I need some help in creating a simple report that will show the last 12 months closed tickets, I only need the following two columns:

Date (dd/mm/yyyy) the ticket was closed

Time each ticket took to close in days or hours.

I appreciate your help


That's all only 2 columns.

 


1 Comment   [ + ] Show comment
  • Thank you JasonEgg. I'll try that and will post the outcome. Cheers - aoh 7 years ago

Answers (1)

Posted by: JasonEgg 7 years ago
Red Belt
0

How about this:

select HD_TICKET.ID, 
       HD_TICKET.TITLE,
       HD_TICKET.MODIFIED AS `TIME CLOSED`,
       TIMEDIFF(HD_TICKET.MODIFIED,HD_TICKET.CREATED) AS `TIME TO CLOSE`
from   HD_TICKET join HD_STATUS on HD_STATUS.ID = HD_TICKET.HD_STATUS_ID
where  DATE_SUB(NOW(), INTERVAL 1 YEAR) > HD_TICKET.MODIFIED 
       and HD_STATUS.STATE = 'closed'

Comments:
  • change the fourth line to the following to show time as days (rounded):
    DATEDIFF(HD_TICKET.MODIFIED,HD_TICKET.CREATED) AS `DAYS TO CLOSE` - JasonEgg 7 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ