Need to re-open a Change Request that was closed accidentally

robinsamberg
Tera Expert

Hello all,

I was not paying attention and I closed a Change Request that I thought was mine but it was not.  Now I am hoping for a way to re-open what I closed so its assignee can complete the notes.  I have been poking around but none of the scripts I have found so far have been successful.  I do have admin access.  Is there a way to accomplish this?  I want to put it back to "Scheduled" or "Implement".  

1 ACCEPTED SOLUTION

Bert_c1
Kilo Patron

Hi @robinsamberg,

 

the following worked for ma as admin, is Scripts - Background:

 

var chg = new GlideRecord('change_request');
chg.addQuery('number', 'CHG0003513');
chg.query();
if (chg.next()) {
	chg.setWorkflow(false);
	chg.state = -2;
	chg.update();
}

View solution in original post

3 REPLIES 3

Bert_c1
Kilo Patron

Hi @robinsamberg,

 

the following worked for ma as admin, is Scripts - Background:

 

var chg = new GlideRecord('change_request');
chg.addQuery('number', 'CHG0003513');
chg.query();
if (chg.next()) {
	chg.setWorkflow(false);
	chg.state = -2;
	chg.update();
}

@Bert_c1 this worked perfectly!  Thank you so much for your help!

This worked for me also.