Notification

Icon
Error

Helpdesk Report for unresolved tickets - I would like to include the last update in the report

Posted: Wednesday, May 27, 2020 2:08:39 PM(UTC)
Walter

Walter

Member Original PosterPosts: 3
0
Like
Helpdesk Report for unresolved tickets
I would like to include the last update in the report

I have this script to include the last comment or note added to a ticket in an unresolved ticket report. But it adds all the font info the note field etc. Please see the picture attached

Select Top 1000000 htblticket.date As [Creation Date],
htblticket.ticketid As [Ticket ID],
htblusers.name As [Requestor Name],
htblticket.subject As Subject,
htblticketstates.statename As Status,
htbltickettypes.typename As [Ticket Type],
htblticketstates.description As [Ticket State],
htblusers1.name As [Agent Responsible],
htblsource.icon As icon,
DateDiff(day, htblticket.date, GetDate()) As [Days Since Creation],
htblticket.deadline,
htblsource.name As Source,
LastNote.name As [Last Updated by],
LastNote.note As [Last Update]
From htblticket
Inner Join htblpriorities On htblpriorities.priority = htblticket.priority
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Left Join htblagents On htblagents.agentid = htblticket.agentid
Left Join htblusers htblusers1 On htblusers1.userid = htblagents.userid
Inner Join htbltickettypes On htblticket.tickettypeid =
htbltickettypes.tickettypeid
Inner Join htblsource On htblticket.sourceid = htblsource.sourceid
Inner Join htblusers htblusers2 On htblticket.userid_lastnote =
htblusers2.userid
Inner Join (Select a.ticketid,
a.date,
a.note,
c.name
From htblnotes a
Left Join (Select htblnotes.ticketid,
Max(htblnotes.date) As date
From htblnotes
Group By htblnotes.ticketid) b On a.ticketid = b.ticketid
Left Join htblusers c On a.userid = c.userid
Where a.date = b.date) LastNote On htblticket.ticketid = LastNote.ticketid
Where htblticketstates.statename <> 'Closed'
Order By [Agent Responsible],
[Days Since Creation]






Walter attached the following image(s):
Lansweeper Report.JPG

Active Discussions

Lansweeper Lost Configuration tab (Admin rights)
by  kspap   Go to last post Go to first unread
Last post: Today at 10:30:12 AM(UTC)
Lansweeper Deployment with different user rights
by  Jupiter_IT  
Go to last post Go to first unread
Last post: Today at 9:39:20 AM(UTC)
Lansweeper cisco fuji device not linking with connected devices
by  char   Go to last post Go to first unread
Last post: Yesterday at 9:12:07 AM(UTC)
Lansweeper Microsoft CVE-2020-1425
by  Richard_B  
Go to last post Go to first unread
Last post: 7/3/2020 4:29:41 PM(UTC)
Lansweeper Wake on Lan in VLANs
by  FrankSc   Go to last post Go to first unread
Last post: 7/3/2020 1:56:46 PM(UTC)
Lansweeper Ticket Closed = email to all helpdesk desk agents
by  Laurent Maene  
Go to last post Go to first unread
Last post: 7/3/2020 1:23:49 PM(UTC)
Lansweeper Helpdek Call Re-Opened
by  pryan67   Go to last post Go to first unread
Last post: 7/3/2020 1:12:17 PM(UTC)
Lansweeper Office 365 32bit vs 64bit?
by  brodiemac-too  
Go to last post Go to first unread
Last post: 7/2/2020 10:35:19 PM(UTC)