How to make a change request Active to false

Mounika66
Giga Contributor

I have a change request whose state was closed incomplete. But still active shows true instead of false.

How can I manually make active false?

Thanks in advance.

1 ACCEPTED SOLUTION

background script

 

var gr = new GlideRecord('change_request');

gr.addEncodedQuery('state=4^active=true'); //make sure about closed incomplete state value

gr.query();

while(gr.next()){

gr.active=false;

gr.setWorkflow(false);

gr.update();

}

 

View solution in original post

7 REPLIES 7

Harsh Vardhan
Giga Patron

if you are an admin you can manually change it from list. 

 

find_real_file.png

 

but proper root cause of this issue can be fixed from your workflow, you need to check which activity set the state value as closed incomplete and there add active is false also. 

Hi,

I cannot manually change from the list. Is there any other way I can make it false?

background script

 

var gr = new GlideRecord('change_request');

gr.addEncodedQuery('state=4^active=true'); //make sure about closed incomplete state value

gr.query();

while(gr.next()){

gr.active=false;

gr.setWorkflow(false);

gr.update();

}

 

for single record 

 

var gr=new GlideRecord('change_request');
gr.get('sys id of your change request');
gr.active=false;
gr.setWorkflow(false);
gr.update();