RITM is not auto closed

Hafila Hatta
Tera Guru

hi. i noticed that after Xanadu release, our RITM stage and state went haywire and causing issue on multiple service catalog. these requests are not auto closed once all tasks are completed. 

 

anyone having similar issue?

2 REPLIES 2

Sumanth16
Kilo Patron

Hi @Hafila Hatta ,

 

Please refer below article:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0687501

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda

Rishi Kendale
Giga Guru

Hi @Hafila Hatta 

 

This is how it should work OOTB. Check if there are any modifications/business rules on the sc_req_item table that are preventing it.

For time being you can perform this with code :

You will need a BR for this:

Write up a After Update BR on sc_task table:

and Condition should be "Active changes to False"

var scTaskGR= new GlideRecord('sc_task');
scTaskGR.addQuery('request_item', current.getValue(request_item)); 
scTaskGR.addQuery('active', true);
scTaskGR.query();
if(!scTaskGR.next()){
	var ritmObj = current.request_item.getRefRecord(); 
	ritmObj.setValue("state", 3);
	ritmObj.update();
}

 

Please mark Correct and Helpful if my answer helps you resolve your issue. Thanks!

Rishi