Merged request

Merged request


MSSQL

SELECT Workorderid "Parent Request",
  (SELECT STUFF(
                  (SELECT cast(Child_woid AS varchar) + char(10)
                   FROM conversation co
                   WHERE conversation.Workorderid=co.Workorderid
                     FOR XML PATH ('')), 1, 0, '')) "Merged Request"FROM conversation
WHERE Child_woid IS NOT NULL
GROUP BY Workorderid

PGSQL

SELECT wo.workorderid "Request ID",
            wo.TITLE "Subject",
            LONGTODATE(wo.CREATEDTIME) "Created Time",
            LONGTODATE(wo.DUEBYTIME) "DueBy Time" , 
            array_to_string(array_agg(Child_woid), ',') "Merged Request" , 
            MAX(aaa.first_name) "merged by" from conversation 
LEFT JOIN workorder wo on conversation.Workorderid=wo.Workorderid 
left join WorkOrderHistory woh on wo.workorderid=woh.workorderid 
left join aaauser aaa on woh.operationownerid=aaa.user_id 
where 
      Child_woid is not NULL and 
      woh.operation='MERGEWITH' 
GROUP BY wo.Workorderid

                                                      
 

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

                      • Merge Similar Requests

                        Requirement: In an organization, multiple requests being created for the same issue.  So we will have to merge all the similar requests. UseCase: Assume there is a printer issue in an organization, and a request has already been registered for the ...
                      • Request recipient email

                        This report is used to find the recipient email address.  Some requests are forward to others through the mail, this report helps to find the statistics how many requests are forward to others using the email address filter.  To make any changes to a ...
                      • Service request approvers

                         This report helps to find the who all the service request approvers in the application.  SELECT aaauser.first_name "Approver Name", dpt.deptname "Department", sdo.name "Site", sd.jobtitle "Job Title" FROM srapproverdetails LEFT JOIN aaauser ON ...
                      • 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", ...
                      • Update Task description with Request description.

                        Requirement: Copy the request description content to all the associated task description. Usecase: When a task is triggered from a request, it should contain the request description in the description of the task. This will enable task technician to ...