RITM still in progress even if the task is closed

Kiddy1
Tera Contributor

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?

1 ACCEPTED SOLUTION

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


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

18 REPLIES 18

felladin
Tera Guru

Hello,



Is this for a single RITM or are you able to replicate the issue?


Can you check the status of the RITM's workflow?


It should tell if there has been an issue. Also, be aware that since Istanbul (if you recently upgraded), there is a new feature in workflows that stops it, should there be an error. Previously it would just move on.


You can change this setting on workflows if needed under respective workflow properties.



With regards


Anton Lindblad


jyoti29208
Giga Expert

Hi Kids,



Please check a business rule called "task closer" is active .If it is active it should close RITM once all tasks are closed.



Please provide your feedback appropriately (Like, Helpful, Endorse AND/OR Correct) to help community.



Thank you!


Regards,


Jyoti Kumari


Shishir Srivast
Mega Sage

Please check if there is any issue with your workflow steps. If it would have been stuck in workflow then you can easily find where it got stuck by just clicking on show Workflow on your RITM page.


find_real_file.png


You can move your workflow from prod to dev, you can open an update set in your prod instance, check out and publish the workflow, then move that into your dev instance and copy over the more recent one. Or you could make a copy in your prod instance and move that with an update set. Then you should be able to reproduce the issue in your dev instance for further testing.


hi srivatsava ,


can we change the state of RITM through background script?