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 ADManager Plus?

                    New to ADSelfService Plus?