
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 02:29 AM
I am looking for a report for "Tickets Created By". This field is in the History tab of the ticket. It is the first entry on all tickets. So I'm guessing this information is recorded somewhere. I just want to be able to get a count of how many tickets were entered by each user, and more specifically, each agent. If someone knows which table and which field to use, I may be able to figure out how to write the report. I would like to be able to choose a date range for this report too (which I would probably have trouble doing). Any help would be appreciated.
Thanks,
Dave
Thanks,
Dave
Labels:
- Labels:
-
General Discussion
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 02:05 PM
This is helpful. Thank you!! At least I can see all of the tickets. Very easy to export to get what I need.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2017 08:39 AM
You have to look at the ticket creation type in htblhistory (check the htblhistorytypes table for more info) to get this data. There are currently 3 types: ticket created (13), ticket created and assigned (31) and duplicated (39). The following is an example for tickets created in 2016:
SELECT htblhistory.date, htblhistory.ticketid, htblusers.name FROM htblhistory INNER JOIN htblusers ON htblusers.userid = htblhistory.userid
WHERE (htblhistory.typeid = 13 OR htblhistory.typeid = 31 OR htblhistory.typeid = 39) AND
(htblhistory.date >= CAST('2016-01-01 00:00:01' as datetime) AND htblhistory.date < CAST('2017-01-01 00:00:01' as datetime))
ORDER BY htblhistory.date
