We have a requirement wherein we need to move 100s of ITG requests to Closed status irrespective of the current status. As it is difficult to do it from dashboard, I am looking for some backend query which can do the job.
I have tried below query but it did not get reflected in the front end.
-- update kcrt_requests set status_id=6 , status_code='CLOSED_SUCCESS' where request_id in ( xxx ,xxx) --
Here you go. This is similar to what I use pretty often. This will simply Close the request from the existing place. If you also want to update additional info like other field values and/or Notes, you will need to incldue additional update scripts before this one. You may also replace the request_id values below with some query if you want. ** Please check your corresponding STAUTS_ID value for status_code below.
UPDATE KCRT_REQUESTS SET status_id=29, -- corresponding STAUTS_ID value for status_code below. status_code='CLOSED_SUCCESS', last_update_date = sysdate - (1/(24 *60 *60)), entity_last_update_date = sysdate - (1/(24 *60 *60)), last_updated_by = 31445 -- Raj Ghimire where request_id in (43283,43100,42612,42051,42047,42044,42039,41869,41794);
Even if the request shows a status of Closed or Complete, it does not mean the request is really closed. Open the graphical view and look for enabled steps. If there are any, the workflow is not closed. Check the Approval Details display, too. Again, if any steps are available for approval, the request is not closed.
Hamsa, Make sure to incldue "last_update_date" and "entity_last_update_date" everytime to make sure the changes gets reflected immediately on commit. That is why I incldued the complete query for you.
Jim, I believe when you set status_code='CLOSED_SUCCESS', the request will actually will Close and it will no longer be eligible for any actions anymore. My udpate above was a little misleading, it should have read "corresponding STAUTS_ID value for STATUS_NAME that you want in kcrt_statuses table" :-) -Raj