Has anyone came up with a cusstom report to show work logged for closed tickets for last X number of days?

I have been backing my head up against a wall trying to figure this out even though it should be simple.

The pre-built reports for tickets closed in past x days by owner is good and the one showing work log in past x days by owner is good but I essentially need to combine those so that I have the closed tickets for past x days sorted and grouped by owner but I also need it to show all work log entries and time for those closed tickets.

Any help with this would be appreciated.

It would also be nice if the built in report wizard would give more choices in the tables and fields you can generate reports off of because getting every piece of syntax in a SQL quiery correct is so tedious.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
The following will give you owners for the last 31 days with closed tickets and hours worked.

Select U.USER_NAME, COUNT(*) AS TICKETS_CLOSED_LAST_31_DAYS, SUM(CAST(HOUR(TIMEDIFF(STOP, START))+ IF((MINUTE(TIMEDIFF(STOP, START)) = 0), 0, (MINUTE(TIMEDIFF(STOP, START))/60)) + ADJUSTMENT_HOURS AS DECIMAL(10,2))) AS HOURS_WORKED_LAST_31_DAYS
FROM HD_TICKET left join HD_STATUS on
HD_STATUS_ID = HD_STATUS.ID
LEFT JOIN USER U ON
U.ID = HD_TICKET.OWNER_ID
LEFT JOIN HD_WORK ON
HD_TICKET.ID = HD_WORK.HD_TICKET_ID
where HD_STATUS.STATE = 'closed' and HD_TICKET.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 31 day)
GROUP BY U.USER_NAME
Answered 06/20/2011 by: craig.thatcher
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity