RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 01:09 AM - edited 10-16-2024 01:10 AM
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?
- 741 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 01:23 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 02:36 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 05:47 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2024 08:53 AM
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.