- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 07:40 AM
We have a series of configuration items that we would like to retire and remove them as selectable options.
I've modified the Install Status and Operational Status to 'Retired' but they are still showing up as usable options.
Is there a best practice to sunset these CI's?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 07:45 AM
Managed to fix this fairly easily:
- I noticed that the cmdb_ci field has a Dictionary Override records for incident, sc_task and change_request. All three of these were overiding the reference qualifier field for the cmdb_ci.
By default (OOTB) the Reference Qualifier field was: sys_class_name!=cmdb_ci_service
I modified this and added a condition to filter out CI's which have an Operational Status of '6', which is retired: operational_status!=6
Combining these I ended up with: operational_status!=6^sys_class_name!=cmdb_ci_service
This ensured that any retired CI's were omitted from the Configuration Item reference field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 07:52 AM
Where are you seeing the CI's still available? Out of the box once set to retired incident and problem should not be visible any retired CI's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 07:58 AM
Hi @Brian Lancaster,
I opened a pre-existing INC record and tried changing the Configuration Item. The retired CI's I had just updated were selectable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 08:12 AM - edited 09-09-2024 08:18 AM
Looking at my own environment it looks like I added a before query BR with no conditions so it always runs and the following code.
Edit: Made a minor update to the code as admin you may need to be able to see retired CIs. This will work for all tables including standard change proposals.
(function executeRule(current, previous /*null when async*/ ) {
if (!gs.hasRole('admin')) {
current.addQuery('operational_status', '!=', 6); // Anything other then retired
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 08:42 AM
Thanks @Brian Lancaster I will give this a try. Very surprised there isn't just a simple way to de-activate CI's.