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 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 ...
                    • Script to Auto merge requests with exact same subject

                      Use case: Too many alerts for the same reason from a machine keeps generating multiple tickets in SDP MSP. You can use the below script to auto-merge the requests in the application. The Merged tickets description will be added as a note to the ...
                    • Request Merge API using Postman.

                      Currently, the Merge API is not included in our documentation. However, I have tested the following API in Postman, and it is working fine on our end. API used: /api/v3/requests/<request_id>/merge_requests {"merge_requests":[{"id":"1"},{"id":"2"}]} ...
                    • Request missing

                      Use case: In some cases, requests are missing. We would get the ID number from acknowledgement notification but we cannot find that in the tickets. In such cases, please follow below steps to find out the details. 1. Make sure to check the Request ...
                    • Script: Auto merge tickets of similar subject and auto closes the ticket--> Used V1 API dont use

                      Use case:   Too many alerts for the same reason from a machine keeps generating multiple tickets in SDP MSP.  You can use the below script to auto-merge the requests and auto close the ticket. What does this script do ? The Merged tickets description ...