Notification

Icon
Error

Helpdesk: Time worked per agent, this month (Built-in)

Posted: Wednesday, August 9, 2017 12:26:09 PM(UTC)
Nick.VDB

Nick.VDB

Member Lansweeper Developer Administration Original PosterPosts: 251
0
Like
Added in v.6.0.100

The report below lists the sum of the time worked values per agent that was added in the current month.

The report will only list users that meet all of the following criteria:
  • The time worked is added to the note of an agent.
  • The time worked is added to a note that was sent in the current month.
  • The time worked is not added to notes in a ticket that has been set to ‘Ignore’.

Code:

Select Top 1000000 htblusers.name As Agent,
  htblusers.username,
  htblusers.userdomain,
  Case htblagents.active When 1 Then 'Yes' Else 'No' End As IsLicenced,
  Convert(nvarchar(10),Ceiling(Floor(Convert(integer,WorkTime.MinutesWorked) /
  60 / 24))) + ' days ' +
  Convert(nvarchar(10),Ceiling(Floor(Convert(integer,WorkTime.MinutesWorked) /
  60 % 24))) + ' hours ' +
  Convert(nvarchar(10),Ceiling(Floor(Convert(integer,WorkTime.MinutesWorked) %
  60))) + ' minutes' As TimeWorked
From htblusers
  Inner Join htblagents On htblusers.userid = htblagents.userid
  Left Join (Select Top 1000000 htblnotes.userid As UserID,
    Sum(htblnotes.timeworked) As MinutesWorked
  From htblnotes
    Inner Join htblticket On htblticket.ticketid = htblnotes.ticketid
  Where DatePart(mm, htblnotes.date) = DatePart(mm, GetDate()) And
    DatePart(yyyy, htblnotes.date) = DatePart(yyyy, GetDate()) And
    htblnotes.timeworked Is Not Null And htblticket.spam <> 'True'
  Group By htblnotes.userid) As WorkTime On htblagents.userid = WorkTime.UserID
Where htblusers.name <> 'system'
Order By WorkTime.MinutesWorked Desc,
  Agent
mlizarbe
#1mlizarbe Member Posts: 1  
posted: 11/4/2019 7:44:38 PM(UTC)
New to Lansweeper. Is there a way to pull data for specific months on this report?

Active Discussions

Report Center Calculate your network's computing power
by  GBInnovation   Go to last post Go to first unread
Last post: Yesterday at 12:11:18 PM(UTC)
Lansweeper Custom All Assets Report Help
by  Matt Fuhrman  
Go to last post Go to first unread
Last post: 11/12/2019 11:13:54 PM(UTC)
Lansweeper Patch Tuesday report, last 3 months
by  JacobH   Go to last post Go to first unread
Last post: 11/12/2019 5:28:37 PM(UTC)
Lansweeper Report ALL office (ms officce,libreoffice,openoffice
by  AlexRus227  
Go to last post Go to first unread
Last post: 11/12/2019 8:37:07 AM(UTC)
Lansweeper Assets Missing Quickfix Data - Last 60 Days
by  Mike6436   Go to last post Go to first unread
Last post: 11/11/2019 6:11:30 PM(UTC)
Lansweeper BlueKeep Vulnerability
by  jwood.mls  
Go to last post Go to first unread
Last post: 11/11/2019 4:58:59 PM(UTC)
Lansweeper tblCPlogoninfo - None interactive logons?
by  Millslansweeper   Go to last post Go to first unread
Last post: 11/8/2019 1:32:12 PM(UTC)
Lansweeper Software : changes last 24 hours Enhancement
by  RC62N  
Go to last post Go to first unread
Last post: 11/7/2019 10:05:53 PM(UTC)