Close parent request only if all the linked request are closed.

Close parent request only if all the linked request are closed.

Requirement:
Parent ticket can be closed only if all the linked requests are closed

Usecase:
In many organizations, the parent ticket is divided into many sub-requests, each of which is handled by a different technician/group.
All of these sub-requests are linked to a single-parent ticket.  This parent ticket should not be closed until all linked requests have been resolved.

Steps to configure:
1.  Download the attached scripts.  Copy the contents into Request custom functions.

2.  Goto Admin > Request Custom Function > Global Function > New > Paste the global function contents and save it with a name.
Update the URL and integration/technician key in the script. 
  1. For builds over 11300, you can get the integration key under Admin > Integrations > Integration Key > New
  2. Please use an integration key with admin privilege, as there wont be any role related permission issues. 

  3. For builds prior to 11300, refer https://help.servicedeskplus.com/api/rest-api.html$key and update the technician key.

3.  Goto Admin > Request Custom Function > Custom Function > New > Paste the CloseParent_only_if_all_the_linked_requests_are_close.txt content and save it with a name
Update the global function count according to your instance

4.  Configure the created custom function in a Business Rule to get executed every time a request is close.




                  New to ADSelfService Plus?

                    • Related Articles

                    • 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 ...
                    • Linked request

                      This report is used to find the child request id that are linked to the parent request id.  To make any changes to a query, refer to the KB article below. ...
                    • 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 ...
                    • Close all linked requests when a parent request is closed - Deluge

                      Requirement: All the linked requests need to be closed when the parent request is closed. Refer to this link for Python equivalent:  https://pitstop.manageengine.com/portal/en/kb/articles/how-to-close-linked-requests-when-a-parent-request-is-closed ...
                    • 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 ...