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 ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • 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", ...
                      • 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 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 ...
                      • Automatically close request after successive approval reminders.

                        This post describes the use of a python script to close requests after successive approval reminders using Custom Schedules. Use Case: We have an option under the self-service portal in order to send reminders mail for the approvals, what would be ...