This report is to get the list of deleted requests in the application.
This data can be retrieved from the system log viewer and request trash.
System Log Viewer:
SELECT err.message "System log message",
err.errormodule "Module",
err.suberrormodule "Sub Module",
err.action "Action",
err.type "Type",
au.first_name "Performed by",
longtodate(err.occurredtime) "Time of occurrence" FROM errorlog err
LEFT JOIN aaauser au ON err.ownerid=au.user_id
WHERE err.action LIKE '%Delete%'
AND err.errormodule LIKE '%Request%'
AND au.first_name IS NOT NULL
AND occurredtime >=
<from_thisweek>
AND occurredtime <=
<to_thisweek>
Trash
:
SELECT WORKORDERDELETEHISTORY.WORKORDERID "Request id",
wo.TITLE "Subject",
aau.FIRST_NAME AS "Requester", ti.FIRST_NAME AS "Technician", std.STATUSNAME AS "Request Status",del.first_name "Deleted by" FROM WORKORDERDELETEHISTORY
LEFT JOIN Workorder wo ON WORKORDERDELETEHISTORY.WORKORDERID=wo.WORKORDERID
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 ItemDefinition icd ON wos.ITEMID=icd.ITEMID LEFT JOIN SubCategoryDefinition scd ON wos.SUBCATEGORYID=scd.SUBCATEGORYID 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 StatusDefinition std ON wos.STATUSID=std.STATUSID
left join aaauser del ON cast(cast(WORKORDERDELETEHISTORY.deletedby as varchar)as int)=del.user_id