I have created a simple report that would show us a simple overview (Agent, Requester, subject, and description of all tickets), opened and closed in the last 24 hours.
The report I have so far
Select Top 1000000 htblticket.date As [Date Created],
htblticket.agentid As Agent,
htblticket.fromuserid As Requester,
htblticket.subject As Subject,
htblnotes.note As Description
From htblticket
Inner Join htblnotes On htblticket.ticketid = htblnotes.ticketid
Where htblticket.ticketstateid = 2 And DateDiff(minute, htblticket.date,
Current_TimeStamp) <= 1440
an example of the output would look like;
Date Created: 11/15/2016 14:44:4
Agent: 16
Requester: 32
Subject: Test Subject
Description: Test description
What is the best way to get Agent 16 to show up as John Agent and Requester 32 to show up as Jane Requster?
Also, currently I have htblticket.ticketstateid = 2 which only shows tickets that are open. How can I get it to show closed tickets as well?