Skip to content

Instantly share code, notes, and snippets.

@nicoletta-maia
nicoletta-maia / 01-osTicket-assignments.sql
Last active March 31, 2022 14:11
Custom reports on the database of osTicket 1.10. Here some simple queries
-- The table `ost_thread_event` contains a log of events like the assignments;
-- please note that the auto-claims on response aren't recorded.
-- For example to get the assignment done between the '2018-06-01' and '2018-07-01' you can use a query like this:
SELECT `TE`.`username`, COUNT(*) AS `Assignments`
FROM
`ost_thread_event` AS `TE`
JOIN
`ost_thread` AS `T`
ON `TE`.`thread_id` = `T`.`id` AND `T`.`object_type` = 'T'