How can we restore the state of a cancelled Change Request?

Sabry Shaheen
Mega Expert

Hi, experts,

  • How can we restore the state (re-open) a cancelled Change Request?
  • How can we restore the state of a Closed Change Request?

Thanks 

4 REPLIES 4

amaradiswamy
Kilo Sage

Hi,

Are you looking for "Move to draft" kind of functionality where the cancelled/closed Change requests will be made active and the workflow starts from the beginning again?

if yes, then you may try below

1. Create a UI Action called "Move to Draft"

2. Script:

new Workflow().deleteWorkflow(current);
current.state = '-6';//choice value equivalent to draft in your environment
current.update();

 

asifnoor
Kilo Patron

Hi

If its one time script that you are looking for, then go to fix scripts and create new and add this code

var gr = new GlideRecord("change_request");

gr.get("your_sys_id");

gr.state= '-6';

gr.update();

Mark the comment as correct/helpful once worked.

If this has answered the question, kindly mark the comment as a correct answer so that the question is moved to the solved list.

Thanks for marking the comment as helpful. Kindly also click on the button "Mark as correct answer" so that the question is moved to the solved list.