RITM

Anantha27
Mega Guru

I have some tasks under a RITM are marked as complete, but the RITM itself is still showing as “In Progress.” What could be the reason for this, and how would I troubleshoot and ensure the RITM status updates based on the task statuses?

8 REPLIES 8

VishaalRanS
Tera Guru

Hi @Anantha27 

 

Please go through the below links:

Solved: RITM state not getting updated to close/cancelled ... - ServiceNow Community

Update RITM State when Catalog Task is Updated - ServiceNow Community

 

Thanks, and Regards

Vishaal

Please mark this response as correct or helpful if it assisted you with your question.

Ramesh_143
Giga Guru

Hi @Anantha27 ,
Incomplete Workflow:
The workflow attached to the RITM may not be configured to update the RITM's state automatically based on task completion. Pease go through the Workflow attached to that RITM once
Thank you!

Sai Krishna6147
Mega Guru

Hi @Anantha27 

Navigate to the workflow associated with that catalog item and add an event following the creation of the most recent catalog task. Add the Set Values event and set the state and stage to Closed Complete.

 

 

If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Thank you

Sai Krishna

thullurishalini
Kilo Guru

Hi @Anantha27 
You can create or update a business rule to ensure the RITM status is updated when all tasks are complete
(function executeRule(current, previous /*null when async*/) {
var taskGr = new GlideRecord('sc_task');
taskGr.addQuery('request_item', current.request_item);
taskGr.addActiveQuery();
taskGr.query();

if (!taskGr.hasNext()) {
var ritmGr = new GlideRecord('sc_req_item');
if (ritmGr.get(current.request_item)) {
ritmGr.state = 3; // Closed Complete
ritmGr.update();
}
}
})(current, previous);
This script checks if there are any active tasks for the RITM. If none are found, it updates the RITM status to “Closed Complete.”
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful.

Thanks,

Shalini.