For a number of purposes, you may want to generate a report that shows a list of resolved tickets ordered by the number of agents who have replied or added a note to that ticket.
Simply enter these queries into the query builder when creating a custom report in the reporting interface:
SELECT DPQL_COUNT_DISTINCT(tickets_messages.person) AS 'Number of agents', tickets_messages.ticket_id, tickets_messages.ticket
FROM tickets_messages
WHERE tickets_messages.person.is_agent AND tickets_messages.ticket.status = 'resolved'
GROUP BY tickets_messages.ticket_id
ORDER BY DPQL_COUNT_DISTINCT(tickets_messages.person)
Anatomy of a DPQL Query.
添加一条评论
请登录或注册以提交评论。