Close all associated tasks when a request is closed

Close all associated tasks when a request is closed

Requirement:
When a request is closed, it is necessary to close all of its related tasks.

Usecase:
In an organizational context, a request can involve multiple technicians, resulting in its segmentation into distinct tasks. When the request is marked as resolved or closed, all associated tasks seamlessly mirror this status, ensuring streamlined management of requests and associated tasks.

Steps to configure:
1.  Download the attached scripts.  Copy the contents into Request custom functions.
2.  Goto Admin > Global Function > New > Paste the global function contents and save it with a name.
(Update the SDP configurations details in the global function)

3.  Goto Admin > Request Custom Function > New > Paste the closeAllAssociatedTasks.txt content and save it with a name
4.  Configure the created custom function in a trigger to get executed every time a request is closed.


                    New to ADSelfService Plus?

                      • Related Articles

                      • Script: Close associated changes when a request is closed

                        Use case:  In many cases, the client never comes back to confirm the change. This means that the change remains opened indefinitely. When the ticket is closed it is logical that the change to be closed. No one is going to close a ticket unless the ...
                      • How to close associated incident requests of change request automatically

                        This post describes the use of a python script to close change that are in a specific stage using Custom Schedules. Use Case: There may be a scenario where number of Change Requests that have got closed and the associated incident is still in open ...
                      • 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 ...
                      • Number of open and closed tasks per ticket (MSSQL)

                        Tested in Build MSSQL (14306) MSSQL: SELECT "wo"."WORKORDERID" AS "Request ID", "qd"."QUEUENAME" AS "Group", "aau"."FIRST_NAME" AS "Requester", "dpt"."DEPTNAME" AS "Department", "cd"."CATEGORYNAME" AS "Category", "scd"."NAME" AS "Subcategory", ...
                      • Query to show who closed the request

                        PGSQL & MSSQL: select wo.workorderid "Request ID", aau.first_name "Request Closed By", cit.typename "Role", queuedefinition.queuename "Group" from WorkOrder wo LEFT JOIN WorkOrderHistory woh ON wo.WORKORDERID = woh.WORKORDERID LEFT JOIN ...