/build/static/layout/Breadcrumb_cap_w.png

ServiceDesk Report Help

Hi all,

I'm trying to get a report set up that shows a list of all tickets by owner for the last week, including hours worked.  I then want to show a total for each owner so something like:

OWNER

  • Job 1 - Job Title - 2 hours
  • Job 2 - Job Title - 4 hours
  • Job 3 - Job Title - 5 mins

Total for ONWER: 6 hours 5 mins

 

Any ideas on how to achieve this?  SQL is not my strong point and whilst I can get the results back, I can't figure out how to sum the hours worked for each group.

Cheers.  Dave


0 Comments   [ + ] Show comments

Answers (1)

Posted by: jverbosk 11 years ago
Red Belt
0

Here's an example report I created to sum up all of the vacation, personal and sick days for each person in my time tracking queue (which I'll be documenting completely and sharing as I have time).  But this should at least let you get started with how to sum the hours and rename the columns to whatever you want (I'm doing both with one statement).  Just for reference, I have three categories (Request::Vacation, Request::Personal Day, Sick Day) and the three SUM lines basically say "if the category is ____, then add up all of the days (kept in T.CUSTOM_FIELD_VALUE6) and call that column _____".  Hopefully enough of an example here to let you get yours working.

_________________________________

*Title*

Time Tracking - Concise Listing

*Category*

Time Tracking (Custom)

*Description*

Concise listing of days off by employee.

*SQL Select Statement*

SELECT T.CUSTOM_FIELD_VALUE0 as EMPLOYEE,

SUM(CASE WHEN C.NAME like '%Vacation%' then T.CUSTOM_FIELD_VALUE6 else 0 END) as VACATION_DAYS,

SUM(CASE WHEN C.NAME like '%Personal%' then T.CUSTOM_FIELD_VALUE6 else 0 END) as PERSONAL_DAYS,

SUM(CASE WHEN C.NAME like '%Sick%' then T.CUSTOM_FIELD_VALUE6 else 0 END) as SICK_DAYS,

T.CUSTOM_FIELD_VALUE1 as DEPARTMENT,

T.CUSTOM_FIELD_VALUE2 as LOCATION, U.FULL_NAME AS MANAGER

FROM HD_TICKET T

JOIN HD_CATEGORY C ON (C.ID = HD_CATEGORY_ID)

JOIN USER U on (U.EMAIL = T.CUSTOM_FIELD_VALUE7)

WHERE T.HD_QUEUE_ID = 4

GROUP BY EMPLOYEE

_________________________________

Hope that helps!

John

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