Ticket Reporting
Hello, Im looking to create a custom ticket view for weekdays only between 5pm and 12am for the last 3 months. How can I do this? I cant quite seem to figure it out.
Answers (2)
Top Answer
Using a custom ticket view for this type of search might not be the best approach and actually isn't possible because of the options available. A report would be a better approach. The reporting wizard should be able to create this report, but if not, here is a SQL query that will return tickets created after 5:00pm on week days for the past three months.
SELECT ID, TITLE, CREATED
FROM ORG1.HD_TICKET
WHERE HOUR(CREATED) >= 17
AND DAYOFWEEK(CREATED) BETWEEN 1 and 7
AND CREATED > DATE_SUB(NOW(), INTERVAL 3 MONTH)
I think you may be struggling as you haven’t defined what you want in your report?
Do you want calls logged between those hours or closed within those hours?
If it’s logged you want HD_TICKET.CREATED and a where statement that says created between 5 and 12 and day is M-F
If it’s closed then you want HD_TICKET.CLOSED with a similar where statement.