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.
- For builds over 11300, you can get the integration key under Admin > Integrations > Integration Key > New
- Please use an integration key with admin privilege, as there wont be any role related permission issues.
![](https://pitstop.manageengine.com/galleryDocuments/edbsn9ba350ffb264d5a27d87301d0967370b61a18a23eaf73c12e5d02fc4b3f39dc7f6b7ee126df89d2bbbf1bd0ce56a05f4?inline=true)
- For builds prior to 11300, refer https://help.servicedeskplus.com/api/rest-api.html$key and update the technician key.
![](https://pitstop.manageengine.com/galleryDocuments/edbsna95dfe8f4a770d3aa4ec2cb56f38230febb1c9f790a47d0b63244addb142730e2db490fbe1b98ae6da37358dcfd9d8be?inline=true)
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.