Report that returns tickets with 0 work hours
10/12/2015 1707 views
I'd like a to create a report that will return tickets that have no hours entered for work.
There's a built in report called "Work Report last 31 days by person" which is how I'd like it to look but to show only tickets that don't have any hours entered.
Answer Chosen by the Author
Please log in to answer
The format of this report is a little different because the returned data doesn't match the report you cited, but this query should get you what you need:
select T.CREATED, CONCAT(CAST(T.ID AS CHAR), " - ", T.TITLE) as TICKET,
(SELECT SUM(ADJUSTMENT_HOURS) FROM HD_WORK WHERE HD_WORK.HD_TICKET_ID = T.ID) AS HOURSWORKED
from HD_TICKET T
where T.CREATED > DATE_SUB(NOW(), INTERVAL 31 DAY)
HAVING (HOURSWORKED is null or HOURSWORKED = 0)
order by TICKET
Answered 10/13/2015 by: chucksteel