Report on requests pending approval

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",
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 ApprovalStatusDefinition.STATUSNAME like '%pending%' and std.ispending='1'
order by 1

          • Related Articles

          • How to email pending requests list to technician periodically

            This post describes the use of a python script to email pending requests to each technician in a periodic interval using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk ...
          • Pending Request for more than 10 days

            This report provides a quick view of all Pending incidents which are not closed for more than 10 days. When the incidents start backlogging faster than they can be resolved, the tendency of long incidents pending time can be exposed in this report. ...
          • 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.   To make any changes to a query, ...
          • Close requests with pending approval for more than 10 days

            Requirement:  Close older requests with pending approvals. UseCase:  Close all requests for which approvals have been sent but no action has been taken in more than 10 days. Please follow the below steps.  Goto Reports > New Query Report > execute ...
          • How to send periodic notifications to requester(s) about their pending requests and accordingly update their status.

            This post describes the use of a python script to notify requester(s) about their requests through email and move those to a specific status. Use Case: Let us assume a scenario where the technicians reply to a request and put it in a custom status ...