This is a simple report I wanted to share that pulls a random 3 tickets of a given owner that were closed in the past week. We set these up on a recurring weekly schedule to look at 3 tickets for quality control without bias or need to go rooting around.
Best, Tim
SELECT HD_TICKET.ID, HD_CATEGORY.NAME AS CATEGORY, S.FULL_NAME AS SUBMITTER_NAME, HD_TICKET.TITLE FROM HD_TICKET JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID) LEFT JOIN USER S ON (S.ID = HD_TICKET.SUBMITTER_ID) LEFT JOIN USER O ON (O.ID = HD_TICKET.OWNER_ID) JOIN HD_STATUS ON (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID) WHERE (HD_TICKET.HD_QUEUE_ID = 1) AND ((O.FULL_NAME like '%OWNERRRRNAME%') AND (date(HD_TICKET.TIME_CLOSED) >= date_sub(curdate(), interval dayofweek(curdate()) - 1 + (7*1) day) AND date(HD_TICKET.TIME_CLOSED) < date_add(curdate(), interval dayofweek(curdate()) - 1 day) ) AND (HD_STATUS.NAME = 'Closed')) ORDER BY RAND() LIMIT 3
Comments