Skip to content

Commit 4a9b06c

Browse files
Iuliakadmin
andauthored
Check the incidents that are closed or canceled but still active (#87)
* 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. * 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 * Update README.md Moved the Check for incidents closed and still active in the manageability Section --------- Co-authored-by: admin <admin@example.com>
1 parent 8b56639 commit 4a9b06c

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ Script Includes names should not include spaces since it is not possible to call
115115
### Roles assigned to non-existing users
116116
Identify role assignments (sys_user_has_role) for users that do not exists
117117

118+
### Check the incidents that are closed or canceled but still active
119+
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.
120+
118121
## Category: Upgradability
119122

120123
### Call GlideRecord using new
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
AJInFJMOarSNZgy4eVPEI6ZUZTQO4buAfQ2jkBnzn77pHO8fWCuHP6neLRGKEC7iHlLsbGUl7is0NbkoHxzYWRkTwTxhYVY8p9qCuZPB6YXTBkKDo8X2oq-DOGp4hb5uwk5ES8I7a5hNCsIupO6JhrWFLLh9qeaJE6_nOsE-dMhwybJBxSvcaKmrcNqz51GJVu2Xb924Gs7sa1p1UzRVoKKd1z51VqR_oDCNJThz-yAlVdbnTqEKTdU9D98hy8yFXdRNPBow85OFDE3XWTjcfikcrqdULj0MLLarAcUvTuUgMfGBdFJYbnVNpxi7tVUR1SQ2aehcEujbsK-xJEY9kxmygBiddEm1KK1qiSlPJxRpEYo2doHSfVsxddkjkJyz8Ulja82BKj3D4i2EsUR75GcJzwmfgafdoO-pPRRarwYzGDUbWpe1iCTbmJHSZ_OxJTiJTiWGET89NVxYQZ80w3xSAPg7eyjtv4O3ezYEb4fAAQTiRH-6DwihD62dtq9qXKirZdtq9sa8mBL6UQJ_u5EqIeNo7bvkflLQgojzcUf4pM5pc_VHEgfmpEah9Qv6T98rIPOdMkH_dAB5q3uvbmBcPdOy_pNXjNEyLa28W5X9WA6nG3Qu3C0sW-oupQc1u2VgLrFj1hXAkdFHKn-oBIzWc6_--zdSXs70dzyZFBg
1+
r4ZuX_Pi1kiBWA3uccoq6uRBy5jhyU7u2FWxZb2f3Ljn3XhaKUHx5gmeOg0xXarKLDSSUuu2ohefZAzWNoWneSzxr5Y4vQT1Env7MeNsLl0kj_G8SpHUwUVoPxt7fILrxdvRFHO53wQ1lrXgE50HG7sazqh9s1KgUEMYAyXLNktTH1J9tNg5V-7sL-I4U4ZUB4NfOLMYsNopUnApMA5Tup2Eh66FQ4srJDTBM_3rDMHtqLXBhnFjAPXcEr4h7Z6q3_dbloqAuiP7Lvq2IksKp0-cWND3Inh_g58QP3yhkhxngsNT0mV6b4Sf1-l3QR7JGbG8-S-KezXbuJab5rPdOPu7mJNzR6A8K0QzYu8FWPQtGkvvH-gmniqKk6NV4-RAR_x1pxdZSGPTXz3vLvk_HhS0kY9BMHpTeOcpoub9YNzc8m4yjtte8G7ceciXRN-5bRzwTyqkgKJB7JEn6D4SRFFOqDCmkYTWv3PZUp_sznMQ76nSassjdoCNCUW1o1XVUmmp3XiMp5bnefYAyfaEBTYkQkVNiLUZ3S3G6VF4uXq54PK26Nrj9NHwiv7dIYn3xPkU7BlHHFZpthr-zMDLejkwV89iGv_bqhn0F3uKnv4a_CJhXa5U4rfWQIwiDo27aheYcsNvqhQ6Sbb4wC2OYXTbdY7JsGUmpDiimevQ6nk
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check">
2+
<scan_table_check action="INSERT_OR_UPDATE">
3+
<active>true</active>
4+
<advanced>false</advanced>
5+
<category>manageability</category>
6+
<conditions table="incident">active=true^state=7^ORstate=8^EQ<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
7+
<item display_value="Closed" endquery="false" field="state" goto="false" newquery="false" operator="=" or="false" value="7"/>
8+
<item display_value="Canceled" endquery="false" field="state" goto="false" newquery="false" operator="=" or="true" value="8"/>
9+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
10+
</conditions>
11+
<description>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.</description>
12+
<documentation_url/>
13+
<finding_type>scan_finding</finding_type>
14+
<name>Check incidents that are closed or cancelled but still active</name>
15+
<priority>3</priority>
16+
<resolution_details/>
17+
<run_condition/>
18+
<score_max>100</score_max>
19+
<score_min>0</score_min>
20+
<score_scale>1</score_scale>
21+
<script><![CDATA[(function (engine) {
22+
23+
// Add your code here
24+
25+
})(engine);]]></script>
26+
<short_description>Verify that closed or canceled records are not active anymore</short_description>
27+
<sys_class_name>scan_table_check</sys_class_name>
28+
<sys_created_by>admin</sys_created_by>
29+
<sys_created_on>2023-10-12 11:23:44</sys_created_on>
30+
<sys_id>22407c16473d35103899fa37536d43e3</sys_id>
31+
<sys_mod_count>0</sys_mod_count>
32+
<sys_name>Check incidents that are closed or cancelled but still active</sys_name>
33+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
34+
<sys_policy/>
35+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
36+
<sys_update_name>scan_table_check_22407c16473d35103899fa37536d43e3</sys_update_name>
37+
<sys_updated_by>admin</sys_updated_by>
38+
<sys_updated_on>2023-10-12 11:23:44</sys_updated_on>
39+
<table>incident</table>
40+
<use_manifest>false</use_manifest>
41+
</scan_table_check>
42+
<sys_translated_text action="delete_multiple" query="documentkey=22407c16473d35103899fa37536d43e3"/>
43+
</record_update>

0 commit comments

Comments
 (0)