Closed Change Tickets are still showing as active.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 08:50 AM
We have 54 Change tickets that are in a Closed State but are still Active. How can we get this corrected ?
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 08:57 AM
Hi,
You can run a background script to make them inactive. Or just in list view have a bulk edit to inactivate them. It may trigger some business rules which are on inactivating the records. If thats not needed then a background script with setWorkflow(false) can be executed.
Apart from this, you will need to check why the closed records are still active. Is it happening for new records also that you close or they are just some history records which are like that. But figuring out the cause will help you to ensure that it dont happen again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 08:59 AM
Hi,
Write a fix script to correct this, Make sure you run this in lower environment before running in Prod
var count=0;
var gr = new GlideRecord('change_request');
gr.addQuery('state', 'closed');
gr.addQuery('active', 'true');
gr.query();
while(gr.next())
{
count++;
gr.active = 'false'
gr.setWorkflow(false);
gr.update();
}
gs.print("Number of closed changes are ", count);
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2022 09:01 AM
Is it happening for all Change Requests or particular Change Requests?
Please check the BR "Close Ticket" on the change_request table is the condition getting satisfied? Has it been modified by someone?
And to mark this identified Change request you can write a fixed script and run it and update the active field to false and yes try to run the script first in non-prod so have that confidence to run in PROD.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 06:04 AM
Hi Viraj,
how to identify the cause for this ? could you please help me on this.