User Management - to get the list of requests that are due to violate SLA in next 2 days

User Management - to get the list of requests that are due to violate SLA in next 2 days

Use this report to get a list of requests that are due to violate SLA in next 2 days. This helps to alert the team involved working on the request.

PGSQL:


SELECT wo.WORKORDERID "Request ID",
       aau.FIRST_NAME "Requester",
       qd.QUEUENAME "Group",
       cd.CATEGORYNAME "Category",
       wo.TITLE "Subject",
       ti.FIRST_NAME "Technician",
       longtodate(wo.DUEBYTIME) "DueBy Time" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
LEFT JOIN statusdefinition std ON wos.statusid=std.statusid
WHERE (wo.ISPARENT='1')
  AND std.ispending = '1'
  AND wos.isoverdue='0'
  AND (extract(epoch
               FROM(to_timestamp(wo.DUEBYTIME/1000)::TIMESTAMP - now()::TIMESTAMP))/3600/24 >=1
       AND extract(epoch
                   FROM(to_timestamp(wo.DUEBYTIME/1000)::TIMESTAMP - now()::TIMESTAMP))/3600/24 <=3)





MSSQL:


SELECT wo.WORKORDERID "Request ID",
       aau.FIRST_NAME "Requester",
       qd.QUEUENAME "Group",
       cd.CATEGORYNAME "Category",
       wo.TITLE "Subject",
       ti.FIRST_NAME "Technician",
       longtodate(wo.DUEBYTIME) "DueBy Time" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN CategoryDefinition cd ON wos.CATEGORYID=cd.CATEGORYID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
LEFT JOIN statusdefinition std ON wos.statusid=std.statusid
WHERE (wo.ISPARENT='1')
  AND std.ispending = '1'
  AND wos.isoverdue='0'
  AND (((wo.DUEBYTIME/1000)-DATEDIFF(s, '19700101', GETDATE()))/60/60/24 >=1
       AND ((wo.DUEBYTIME/1000)-DATEDIFF(s, '19700101', GETDATE()))/60/60/24 <=3)


To make any changes to this query, refer to this post.


Click this link to navigate to the next report.​


                  New to ADSelfService Plus?