Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
MarkA Offline
New Member
 
Posts: 2
Join Date: Mar 2008
Creating IReport - 07-03-2008, 09:18 PM

So I need some help creating report(s). I am using IReport to build and run the report but I need help with the script and how to accurately get rid of the 'off times'

Code:
SELECT swtickets.ticketmaskid ticketmaskid, swstaff.fullname fullname,swticketstatus.title status_title,swdepartments.title dept_title, swauditlogs.actionmsg actionmsg,
FROM_UNIXTIME((swtickets.dateline), '%m/%d/%Y') AS open_date,
DAYOFWEEK(FROM_UNIXTIME(swtickets.dateline)) AS open_day_of_week,
FROM_UNIXTIME((swtickets.lastactivity), '%m/%d/%Y') AS closed_date,
DAYOFWEEK(FROM_UNIXTIME(swtickets.lastactivity)) AS closed_day_of_week,
SEC_TO_TIME(CASE WHEN swtickets.totalreplies = 0 THEN 0 ELSE (max(swticketposts.dateline)- min(swticketposts.dateline)) DIV swtickets.totalreplies END) avg_response,
SEC_TO_TIME(CASE WHEN swtickets.totalreplies = 0 THEN 0 ELSE (max(swticketposts.dateline)- min(swticketposts.dateline)) END) time_to_resolution,
DATEDIFF(FROM_UNIXTIME(swtickets.lastactivity),FROM_UNIXTIME(swtickets.dateline)) AS days_to_resolution_diff
FROM swticketposts
INNER JOIN swtickets on swticketposts.ticketid = swtickets.ticketid
INNER JOIN swstaff on swtickets.ownerstaffid = swstaff.staffid
INNER JOIN swticketstatus on swtickets.ticketstatusid = swticketstatus.ticketstatusid
INNER JOIN swdepartments on swtickets.departmentid = swdepartments.departmentid
INNER JOIN swauditlogs on swtickets.ticketid = swauditlogs.ticketid
GROUP BY swticketposts.ticketid
ORDER BY swstaff.fullname, swticketstatus.title
For the resolution times I can calculate the number of days and subtract ~16 hours per weekday and 24 hours per weekend but how to I deal with response time?

Thank you,

Mark

PS I am fairly new to SQL scripts so be gentle on me
   
Reply With Quote
  (#2) Old
MarkA Offline
New Member
 
Posts: 2
Join Date: Mar 2008
10-03-2008, 07:43 PM

Oh PS this is a view I am using to query and get the information in the way I need it. Any help would be greatly appreciated as I am at a dead end.
   
Reply With Quote
Reply

Tags
ireport

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a module: Hello World (Complete guide) Sheep Developers & Code 40 18-02-2008 05:36 PM
Hosted account is no longer creating tickets. Anyone else having problems? surveygizmo SupportSuite, eSupport and LiveResponse 2 10-11-2007 08:28 AM
Error Creating Tables Danym SupportSuite, eSupport and LiveResponse 1 03-11-2006 11:22 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46