Force closed a change request

DevtoSME
Giga Guru

I have a dilemma where I need to force close a change request that was already implemented months back however it was done out of business hours so the change request did not go through the proper workflow. It is currently in the draft state and need it to close. Currently the fields would either need to be changed to go through the work flow from 2 months ago to in the future. What are the suggestions of best practice. Do I run a scripts background to force it, do I just update the implementation date and make note of it on the work notes. Any advice is welcomed. 

3 REPLIES 3

Sanjay Bagri1
Tera Guru

Hello @DevtoSME 

First of all you can discuss the business requirement in Team/change management team. If they are agree to close forcefully then we can update the state and close it. 

 

if you want to Close Multiple Changes Below is the code : 

// Background Script Close multiple change requests
var changeNumbers = ['CHG0000123', 'CHG0000124', 'CHG0000125'];
changeNumbers.forEach(function(changeNum) {
var changeGR = new GlideRecord('change_request');
changeGR.addQuery('number', changeNum);
changeGR.query();
if (changeGR.next())
// Skip if already closed
if (changeGR.state == '3') {
gs.info('Change + changeNum + already closed');
return;
changeGR.setValue('state', '3');
changeGR.setValue('close_code', 'successful');
changeGR.setValue('close_notes', 'Bulk closed via script');
changeGR.setValue('closed_at', new GlideDateTime());
changeGR.setValue('closed_by', gs.getUserID());
// Disable workflow to prevent task closure
changeGR.setWorkflow (false);
changeGR.update();
I
gs.info('Closed change: + changeNum);
else {
gs.warn('Change not found: + changeNum);
});

 

Its totally depends on their decisions. 

Thanks

Sanjay Bagri

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @DevtoSME 

 

I worked as a Change Manager, and the first question that came up was: "Why were these not reviewed on time?"

So, it's important to identify the root cause and improve the process accordingly.

Now, the next question is: "Can we close them?"
Yes, you can force close them if, in your assessment, there are no related issues, and no incidents have been logged in the past 2 to 3 months.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

THE WHY AND REASON WAS DISCUSSED BY THE CAB BENCH . I've BEEN TASKED TO FORCE IT CLOED FOR AUDITING PURPOSES. I HAVE BOTH THATW ERE IN DRAFT AND ONE ACCIDENTLYCANCELED. IS THERE A WAY TO CHANGE THE STATE TO CLOSED FOR THE CNCLED ONE.