Is it possible to change the state closed incidents to inprogress

Srinivasu2
Tera Contributor

Hi Community,

 

i have a requirement in service now, one parent ticket with 325 child tickets have been resolved instead of cancelled

 

need to cancel that parent incident , so that all the child will be cancelled too in service now

 

since the tickets are closed, i couldn't make that changes

 

will it be possible for you to change it?

 

 

Thanks & Regards,

Srinivasu

6 REPLIES 6

Hi @Moin Kazi ,

 

Could you please share the script which we can use in Fix script, I don't have any idea how to write this script 

 

Thanks,

Srinivasu

Hi @Srinivasu2 ,

 

Please write below script to cancel parent incident -

var incGr = new GlideRecord("incident");
incGr.get("abaead9e5351da1041cb51a0a0490ec0"); // replace sys_id with parent sys_id of your record
incGr.setValue('state', '8');
incGr.update();

Please write below script to cancel all child record -

var incGr = new GlideRecord("incident");
incGr.addEncodedQuery("parent_incident=3f61f9925391da1041cb51a0a0490e3c^"); //replace sys_id with parent sys_id of your record
incGr.setValue('state', '8');
incGr.updateMultiple();

 

Hope this help you.

 

 

Regards

Moin