Scripts to automatically cancel request tasks when the request status is set to cancelled (when the task closure rule is enabled)

Scripts to automatically cancel request tasks when the request status is set to cancelled (when the task closure rule is enabled)

NOTE: In the attached script Owner and Group value is hardcoded, so the script works only when the group and owner name are configured in task closure rules(valid technician name and group name). If technician and group doesn't exist inside the task the script will not work.

Applicable above 14000 builds:

Steps to configure:

1.  Download the attached scripts and extract it.  

2. Go to Admin >> Developer Space >> Global Function >> Copy & Paste the attached GF_Content.txt  as shown in GFConfiguration.txt and save it with a name. (Refer to the attachments for the same  (Refer GF configuration.png). use same names as mentioned.) Update the URL(application URL) and technician key as per your instance.

For creating the Integration key/Technician key refer to this KB link: https://pitstop.manageengine.com/portal/en/kb/articles/creating-integration-key

3.  Go to Admin >> Developer Space >> Request Custom Function ->  Copy & paste CancelTasks.txt and save it with a name.(refer request-customfunction.png and provide all details as shown)
 
4. Go to Admin >> Automation >> Custom Triggers >> Request Custom trigger >> 
Configure the custom functions in a custom trigger. Refer to the screenshot below.


You don't have to shut down and start the application while doing this.

                    New to ADSelfService Plus?

                      • Related Articles

                      • Option to cancel the pending tasks when Request is cancelled- when the worklog is mandatory

                        Requirement: Customer needs to close the tasks when the request is closed and the worklog is mandatory field in request closing rules. Download the attached scripts. Under Admin > Developer Space > Global Custom Function, create a new custom ...
                      • Scripts to cancel tasks when the request status is set to cancel

                        Applicable above 14000 builds Steps to configure: 1. Download the attached scripts and extract it. 2. Go to Admin >> Developer Space >> Global Function >> Copy & Paste the attached GF_Content.txt as shown in GFConfiguration.txt and save it with a ...
                      • Set SLA automatically for a service request using FAFR

                        Note: The below FAFR script will work only on 10600 MSP and above Requirement: Set SLA automatically for a service request depending on the Priority. Usecase: Let us consider a scenario where SLA has to be set depending on the requester's associated ...
                      • Query to show Request and associated task details (PGSQL & MSSQL)

                        Tested in build PGSQL (14300) and MSSQL (14306) PGSQL & MSSQL: SELECT wo.WORKORDERID AS "Request ID", aau.FIRST_NAME AS "Requester", wo.TITLE AS "Subject", pd.PRIORITYNAME AS "Priority", cd.CATEGORYNAME AS "Category", scd.NAME AS "Subcategory", ...
                      • 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 ...