From 127287c23103ccde8e5a76f0cf6ae948b687021f Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 12 Oct 2023 04:28:41 -0700 Subject: [PATCH 1/3] Check the incidents that are closed or canceled but still active (a sign that the close_states are not set correctly on the incident table). This check can be done on any table, especially there where the State model was changed from OOTB or for custom extended tables. The problem with this kind of records is that they can influence the reports on active records on the respective table. --- ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt | 2 +- ...check_22407c16473d35103899fa37536d43e3.xml | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_22407c16473d35103899fa37536d43e3.xml diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt index af32ac0..4951907 100644 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt @@ -1 +1 @@ -AJInFJMOarSNZgy4eVPEI6ZUZTQO4buAfQ2jkBnzn77pHO8fWCuHP6neLRGKEC7iHlLsbGUl7is0NbkoHxzYWRkTwTxhYVY8p9qCuZPB6YXTBkKDo8X2oq-DOGp4hb5uwk5ES8I7a5hNCsIupO6JhrWFLLh9qeaJE6_nOsE-dMhwybJBxSvcaKmrcNqz51GJVu2Xb924Gs7sa1p1UzRVoKKd1z51VqR_oDCNJThz-yAlVdbnTqEKTdU9D98hy8yFXdRNPBow85OFDE3XWTjcfikcrqdULj0MLLarAcUvTuUgMfGBdFJYbnVNpxi7tVUR1SQ2aehcEujbsK-xJEY9kxmygBiddEm1KK1qiSlPJxRpEYo2doHSfVsxddkjkJyz8Ulja82BKj3D4i2EsUR75GcJzwmfgafdoO-pPRRarwYzGDUbWpe1iCTbmJHSZ_OxJTiJTiWGET89NVxYQZ80w3xSAPg7eyjtv4O3ezYEb4fAAQTiRH-6DwihD62dtq9qXKirZdtq9sa8mBL6UQJ_u5EqIeNo7bvkflLQgojzcUf4pM5pc_VHEgfmpEah9Qv6T98rIPOdMkH_dAB5q3uvbmBcPdOy_pNXjNEyLa28W5X9WA6nG3Qu3C0sW-oupQc1u2VgLrFj1hXAkdFHKn-oBIzWc6_--zdSXs70dzyZFBg +r4ZuX_Pi1kiBWA3uccoq6uRBy5jhyU7u2FWxZb2f3Ljn3XhaKUHx5gmeOg0xXarKLDSSUuu2ohefZAzWNoWneSzxr5Y4vQT1Env7MeNsLl0kj_G8SpHUwUVoPxt7fILrxdvRFHO53wQ1lrXgE50HG7sazqh9s1KgUEMYAyXLNktTH1J9tNg5V-7sL-I4U4ZUB4NfOLMYsNopUnApMA5Tup2Eh66FQ4srJDTBM_3rDMHtqLXBhnFjAPXcEr4h7Z6q3_dbloqAuiP7Lvq2IksKp0-cWND3Inh_g58QP3yhkhxngsNT0mV6b4Sf1-l3QR7JGbG8-S-KezXbuJab5rPdOPu7mJNzR6A8K0QzYu8FWPQtGkvvH-gmniqKk6NV4-RAR_x1pxdZSGPTXz3vLvk_HhS0kY9BMHpTeOcpoub9YNzc8m4yjtte8G7ceciXRN-5bRzwTyqkgKJB7JEn6D4SRFFOqDCmkYTWv3PZUp_sznMQ76nSassjdoCNCUW1o1XVUmmp3XiMp5bnefYAyfaEBTYkQkVNiLUZ3S3G6VF4uXq54PK26Nrj9NHwiv7dIYn3xPkU7BlHHFZpthr-zMDLejkwV89iGv_bqhn0F3uKnv4a_CJhXa5U4rfWQIwiDo27aheYcsNvqhQ6Sbb4wC2OYXTbdY7JsGUmpDiimevQ6nk \ No newline at end of file diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_22407c16473d35103899fa37536d43e3.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_22407c16473d35103899fa37536d43e3.xml new file mode 100644 index 0000000..f423b18 --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_22407c16473d35103899fa37536d43e3.xml @@ -0,0 +1,43 @@ + + + true + false + manageability + active=true^state=7^ORstate=8^EQ + + + + + If records closed or canceled are still active, it can influence the state of the reports on the table. The close_states/work_states may not be set correctly in the column attributes. + + scan_finding + Check incidents that are closed or cancelled but still active + 3 + + + 100 + 0 + 1 + + Verify that closed or canceled records are not active anymore + scan_table_check + admin + 2023-10-12 11:23:44 + 22407c16473d35103899fa37536d43e3 + 0 + Check incidents that are closed or cancelled but still active + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_22407c16473d35103899fa37536d43e3 + admin + 2023-10-12 11:23:44 + incident
+ false +
+ +
From a50ebfcc8e4884c063eaaf6066900a19d82699e4 Mon Sep 17 00:00:00 2001 From: Iuliak <32241359+Iuliak@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:23:44 +0200 Subject: [PATCH 2/3] Added the Check the incidents that are closed or canceled but still active check README.md Added the Check the incidents that are closed or canceled but still active check --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c4784ce..a4d800e 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,9 @@ Note: It was suggested by ServiceNow support to add table "http_connection" in c ### Avoid using alert() in client scripts It is recommended to use an OOB library for modals in order to improve the user experience instead of alert(). +### Check the incidents that are closed or canceled but still active +This is a table check on the incidents table that verifies if there are closed or canceled incidents in the active state, which would be a sign that the close_states are not set correctly on the incident table. This check can be done on any table, especially there where the State model was changed from OOTB or for custom extended tables. The problem with this kind of records is that they can influence the reports on active records on the respective table. + # Additional resources Please check these additional links for more information and details: From 050aed20c44c73f3d65e535acc0db8a958b56e4a Mon Sep 17 00:00:00 2001 From: Iuliak <32241359+Iuliak@users.noreply.github.com> Date: Fri, 13 Oct 2023 17:31:52 +0200 Subject: [PATCH 3/3] Update README.md Moved the Check for incidents closed and still active in the manageability Section --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a4d800e..5be4520 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,9 @@ Script Includes names should not include spaces since it is not possible to call ### Roles assigned to non-existing users Identify role assignments (sys_user_has_role) for users that do not exists +### Check the incidents that are closed or canceled but still active +This is a table check on the incidents table that verifies if there are closed or canceled incidents in the active state, which would be a sign that the close_states are not set correctly on the incident table. This check can be done on any table, especially there where the State model was changed from OOTB or for custom extended tables. The problem with this kind of records is that they can influence the reports on active records on the respective table. + ## Category: Upgradability ### Call GlideRecord using new @@ -261,9 +264,6 @@ Note: It was suggested by ServiceNow support to add table "http_connection" in c ### Avoid using alert() in client scripts It is recommended to use an OOB library for modals in order to improve the user experience instead of alert(). -### Check the incidents that are closed or canceled but still active -This is a table check on the incidents table that verifies if there are closed or canceled incidents in the active state, which would be a sign that the close_states are not set correctly on the incident table. This check can be done on any table, especially there where the State model was changed from OOTB or for custom extended tables. The problem with this kind of records is that they can influence the reports on active records on the respective table. - # Additional resources Please check these additional links for more information and details: