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.




          • 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 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 ...
          • Request closed by and Resolved by from history

            This report is used to find the closed by and resolved by technician from the history. In some cases the request may be assigned to some technician and it is closed by a different technician. This information is captured in the history.  To make any ...
          • 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 ...