Close all the associated requests when a change is closed

Close all the associated requests when a change is closed

Requirement:
When a change is closed, all the associated requests have to be closed. 
This includes both:
  1. Change initiated due to request
  2. Request caused by change

Steps to configure:
  1. Goto Admin > Developer Space > Global function > New > Paste the content from the attachment  Global function_4.txt  and save it with a name.
  2. Update the URL and integration key in the script. 
    1. 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. Update the integration key in the global function.



Change initiated due to request:
Steps to configure:
  1. Go to Admin > Developer Space > Change Custom Functions. Create a new function. Paste the content of "close_request_change_initiated_due_request.txt".
  2. Update the global function count/api name in the custom function.

  3. Configure a custom trigger to invoke the custom function, every time a change is closed.



    Request caused by Change:

    Steps to configure:
    1. Go to Admin > Developer Space > Change Custom Functions. Create a new function. Paste the content of "Close_Request_caused_by_Change.txt".
    2. Update the global function count/api name in the custom function.
    3. Configure a custom trigger to invoke the custom function, every time a change is closed.