Close change requests using custom schedules.

Close change requests using custom schedules.

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 old Change Requests that have gotten lost in the shuffle over the years. Most of these should be closed out as they are no longer required, or were entered by mistake, or just never proceeded any further.
 
Execution steps:
1. Go to Reports--> New Query Report and run the below query and save this report.

SELECT chdt.CHANGEID AS "Change ID" FROM ChangeDetails chdt LEFT JOIN Change_StageDefinition stageDef ON chdt.WFSTAGEID=stageDef.WFSTAGEID WHERE  ( stageDef.DISPLAYNAME = 'Submission' )  and chdt.CREATEDTIME >= <from_lastyear> AND chdt.CREATEDTIME <= <to_lastyear>



This will give you the ID of requests that were created last year and are in "submission" stage. Please update the query based on your requirements.

2. Downloaded the attached Zip file and move the files to ManageEngine/ ServiceDesk/ integration/custom_scripts folder
3. Edit configuration.json file and update the application URL and the Technician Key
4. Configure the schedule under Admin--> Custom Schedule

I've attached a screenshot showing a sample implementation below.




A short guide on setting up python is available  here
Refer to the link below in order to setup the schedule,

                  New to ADSelfService Plus?

                    • Related Articles

                    • 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 ...
                    • Script to bulk close change using deluge script based on the status

                      The following script will help you bulk close changes based on the status of change using custom schedules 1. Go to Reports tab --> New query report --> copy the query to the query editor and run the report. Save the report in the folder. The query ...
                    • How to create a change automatically based on a schedule

                      This is a sample python script that triggers the creation of a Change Request in ServiceDesk Plus using the Change API based on a schedule Note:  Attached script will not work beyond 11138 SDP Version. ​ A short guide on setting up python is ...
                    • 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 ...
                    • How to automatically close requests that are in a specific status.

                      This post describes the use of a python script to close requests that are put in a specific status using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk Plus. What is ...