RITM showing State as Work in Progress greyed out

Winnie P
Mega Sage

Hello there. We have a few RITMs, Stage = Completed & State = Work in Progress.  All Tasks are Closed Completed.  How can you change the State = Completed if the option is greyed out please? Thank you.

find_real_file.png

1 ACCEPTED SOLUTION

Winnie P
Mega Sage

Quick solution, from Support HI

Log in as admin > Access the Requested Items list > Click on cog wheel to Customised list columns > add State field to list > change State from WIP to Closed Completed

find_real_file.png  find_real_file.png

View solution in original post

14 REPLIES 14

Hi

To correct data in Production, for records, that have to be "corrected against" normal behavior, you best write a script in any sub prod instance and test it good, to be sure that it will do what you expect.

Then copy the script (even via clipboard) and execute it on Prod.

You can navigate to "Fix scripts" which are intended for exactly cases. They also log that they ran, and when. Even, that you do not execute them twice, which is often critical.

Have a brief look ar the ServiceNow docs online, to read about Fix Scripts.

Let me know if that answers your question and mark my answer as correct and helpful.

BR

Dirk

Hi

Please write a business rule on sc_task table on before insert update

and in filter condition select state is close complete. I also attached screenshot of my code into attachment 

Now in advance section 

var flag = true;
var gr = new GlideRecord("sc_task");
gr.addQuery("request_item",current.request_item);
gr.query();
while(gr.next())
{
if(gr.state!=3)
{
flag = false;
}
}
if(flag){
var gr = new GlideRecord("sc_req_item")
gr.addQuery("number",current.request_item)
gr.query();
if(gr.next())
{
gr.setValue("state","3");
gr.update();

}

}

please mark my answer as correct and helpful 

Regards

Virendra Mali

Thank you Vendra. I am getting the script error when trying your business rule, sorry I don't have any scripting experience:

find_real_file.png

I managed to remove the javascript parse error. However, can you please advise what your business rule does?  Will it allow me to change the few RITMs where State is Work in Progress to Completed? Thank you.

Please add one more } after line 25.

Thanks,

Saji