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 as "Request ID",
      aau.FIRST_NAME as "Requester",
      wo.TITLE as "Subject",
      ti.FIRST_NAME as "Technician",
      qd.QUEUENAME as "Group",
      std.STATUSNAME as "Request Status",
      longtodate(wo.CREATEDTIME) as "Created Time",
      app_level.name "Level name",
      asd.statusname AS "Approval Status",
      LONGTODATE(app_details.SENT_TIME) AS "Approval Sent date",
      LONGTODATE(app_details.ACTION_DATE) AS "Approved Date",
      approver.FIRST_NAME "Approver Name",
      app_details.EMAIL "Approver Email",
      app_details.COMMENTS as "Approver Comments" 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 WorkOrder_Queue woq ON wo.WORKORDERID=woq.WORKORDERID
LEFT JOIN QueueDefinition qd ON woq.QUEUEID=qd.QUEUEID
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 Request_ApprovalLevel req_app_level on req_app_level.entityid=wo.WORKORDERID
LEFT JOIN Approvallevel app_level on req_app_level.levelid = app_level.id
LEFT JOIN ApprovalDetails app_details on app_details.approval_level_id = app_level.id
LEFT JOIN ApprovalStatusDefinition asd on asd.STATUSID=app_details.STATUSID
LEFT JOIN AaaUser approver ON app_details.approverid=approver.USER_ID
WHERE wo.ISPARENT='1'
      and wo.createdtime >= datetolong('2023-01-01 00:00:00')
      and wo.createdtime <= datetolong('2023-12-31 23:59:59')

 

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

                  New to ADSelfService Plus?

                    • Related Articles

                    • Query to get the Request Approval details

                      Compatible builds : 14000 to 14200 DB : MSSQL /PGSQL OUTPUT: SELECT wo.WORKORDERID AS "Request ID", wo.title AS "Subject", wo.REQUESTERID AS "Requester ID", LONGTODATE(wo.CREATEDTIME) AS "Requested Date", LONGTODATE(apdet.sent_time) AS "Action ...
                    • How to implement dynamic request approval using FAFR and custom triggers.

                      This is a sample script written in Python to handle Conditional Approvals for Incident \ Service Requests, through Custom Triggers using Field and Form Rules.  One of the advantages of using this script is that there is no modification of the script ...
                    • 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 AS "Request Id", pr.SUBJECT AS "PR Subject", pr.DESCRIPTION AS "Description", LONGTODATE(pr.REQUESTEDDATE) AS "Requested Date", LONGTODATE(pr.DATEREQUIRED) AS "Date Required", LONGTODATE(pr.CREATEDDATE) AS "Created Date", ...
                    • Close the request upon adding a note.

                      Kindly follow the steps mentioned below: 1) Go to Admin >> Developer Space >> Custom Function >> Global Functions >> Copy & Paste the attached GF_Content.txt and save it with a name. Update the URL and technician key as per your instance. Refer to ...