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

                    • 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 ...
                    • 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 linked requests when a parent request is closed.

                      This post describes the use of a python script to close all the linked request when a parent request is closed using custom triggers. Use Case: We get tickets which are getting reported for the same issue but different end-users so that once we ...
                    • 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", ...
                    • API call to fill the mandatory fields and close a request simultaneously

                      The "Close Request" API call is used to close a request. But to fill the mandatory fields if any and close a request simultaneously, the "Update Request" API call can be utilized. Example: To fill the mandatory fields like "Resolution" and "Priority" ...