Request Approval Details

Request Approval Details

This report is used to view the historical details of Approved and Denied approval processes and their individual steps.

We can also use this report to display all details for which an approval decision is pending.
SELECT wo.WORKORDERID "Request ID",
       aau.FIRST_NAME "Requester",
       dpt.DEPTNAME "Department",
       wo.TITLE "Subject",
       ti.FIRST_NAME "Technician",
       std.STATUSNAME "Request Status",
       longtodate(wo.CREATEDTIME) "Created Time",
       asd.stagename "Stage name",
       LONGTODATE(ApprovalStage.SENT_DATE) "Approval Sent date",
       LONGTODATE(ApprovalDetails.ACTION_DATE) "Approved Date",
       ApprovalStatusDefinition.STATUSNAME "Approval Status",
       ApprovalDetails.EMAIL "Approver Email" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN DepartmentDefinition dpt ON wo.DEPTID=dpt.DEPTID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
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
JOIN ApprovalStageMapping ON wo.WORKORDERID=ApprovalStageMapping.WORKORDERID
LEFT JOIN ApprovalDetails ON ApprovalStageMapping.APPROVAL_STAGEID=ApprovalDetails.APPROVAL_STAGEID
LEFT JOIN ApprovalStage ON ApprovalDetails.APPROVAL_STAGEID=ApprovalStage.APPROVAL_STAGEID
LEFT JOIN approvalstatusdefinition ON ApprovalDetails.STATUSID=ApprovalStatusDefinition.STATUSID
LEFT JOIN approvalstagedefinition asd ON asd.STAGEID=ApprovalDetails.STAGEID
WHERE (wo.ISPARENT='1')
  AND wo.CREATEDTIME >= <from_thisweek>
  AND wo.CREATEDTIME <= <to_thisweek>

 

Note : Login to ServiceDesk Plus, go to Reports tab > New Query Report > Copy the query to the query editor and run the report. 


          • Related Articles

          • Purchase order approval details

            SELECT po.POCUSTOMID AS "PO Number", max(po.PONAME) AS "PO Name", max(poa.FIRST_NAME) AS "Purchase Requester", longtodate(max(po.DATEORDERED)) AS "Ordered Date", longtodate(max(po.DATEREQUIRED)) AS "Required Date", max(pos.STATUSNAME) AS "PO Status", ...
          • Purchase Request details

            SELECT pr.Requestid "Requestid", pr.Subject "Subject", pr.Description "Description", longtodate(pr.Requesteddate) "Requesteddate", longtodate(pr.Daterequired) "Daterequired", longtodate(pr.createddate) "createddate", pr.Shipping_details ...
          • Purchase Request Approval

            SELECT pr.Requestid "Requestid", pr.Subject "Subject", pr.Description "Description", longtodate(pr.Requesteddate) "Requesteddate", longtodate(pr.Daterequired) "Daterequired", longtodate(pr.createddate) "createddate", pr.Shipping_details ...
          • How to populate request details on associated tasks.

            This sample script is used to update request field values into tasks associated with request templates The Request details are stored as a JSON Object in a file and its path is provided as input to the Script. This can be used in the application ...
          • Report on requests pending approval

            DB Compatibility : PGSQL & MSSQL Build Compatibility : Builds above 10000 SELECT wo.WORKORDERID "Request ID",aau.FIRST_NAME "Requester",dpt.DEPTNAME "Department",wo.TITLE "Subject",ti.FIRST_NAME "Technician", std.STATUSNAME "Request Status", ...