- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 01:00 AM
we have a situation in production instance that RITM still in progress even if the task is closed,how to rectify what has happened and solve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 11:22 PM
Hi,
I would suggest you to try replicating this issue in one of your Sub Production instances to know the Root cause of this. Because this should not happen as the RITM gets automatically closed once the Chile Tasks are made Closed Complete which is an OOB Behavior. You may need to check your Workflow attached to the Catalog Item if it creating an issue or not.
In your Scenario, if you are not able to Replicate this issue and has happened only for once for few Items then you can use a Background Script to close those items from Background as per the script mentioned below:
Script:
var gr = new GlideRecord('sc_req_item');
var string='active=true^number=RITM0010091'; //Replace your RITM Number here
gr.addEncodedQuery(string)
gr.query();
while(gr.next())
{
gr.setWorkflow(false);
gr.autoSysFields(false);
gr.state = 3; //Replace your Closed Complete Value here.
gr.update();
}
I assume as per your scenario that your Catalog task are already completed so you can just go ahead and update your RITM to Closed Complete which are still showing as In progress.
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 09:42 PM
Yes, we can do. Please let me know the exact requirement and I will test the same and will let you know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:01 PM
in one of the ritm the user has not selected the code in a dropdown and closed the task so the ritm is showing it is still in progress so i need background script to change the status as delivered

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:11 PM
Can you please tell me on what condition you want to make the RITM status as delivered?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 10:27 PM
when the task state is completed then i need to set the RITM state as delivered
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2017 11:22 PM
Hi,
I would suggest you to try replicating this issue in one of your Sub Production instances to know the Root cause of this. Because this should not happen as the RITM gets automatically closed once the Chile Tasks are made Closed Complete which is an OOB Behavior. You may need to check your Workflow attached to the Catalog Item if it creating an issue or not.
In your Scenario, if you are not able to Replicate this issue and has happened only for once for few Items then you can use a Background Script to close those items from Background as per the script mentioned below:
Script:
var gr = new GlideRecord('sc_req_item');
var string='active=true^number=RITM0010091'; //Replace your RITM Number here
gr.addEncodedQuery(string)
gr.query();
while(gr.next())
{
gr.setWorkflow(false);
gr.autoSysFields(false);
gr.state = 3; //Replace your Closed Complete Value here.
gr.update();
}
I assume as per your scenario that your Catalog task are already completed so you can just go ahead and update your RITM to Closed Complete which are still showing as In progress.
Hope this helps.Mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke