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 ...
                      • 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 ...
                      • How to email pending requests list to technician periodically

                        This post describes the use of a python script to email pending requests to each technician in a periodic interval using Custom Schedules.This showcases the use of a feature called 'Custom Schedules' that was released in the build 9300 of ServiceDesk ...
                      • Risk matrix for Change using Custom module

                        UseCase: Risk need to be calculated through Risk matrix (similar to Priority matrix in the request module) Steps to configure: Configure custom module as in the attached screenshot. 1. Navigate to Admin --> Developer space --> Custom module --> ...
                      • How to auto-create change request(s) for unplanned changes on Assets

                        This post describes the use of a python script to auto-create change requests for unplanned modifications on Assets using Custom Schedules. This script is applicable only for builds prior to 11138. UseCase: Multiple assets are inventoried in ...