Skip to content

Commit 8e9aff8

Browse files
Iuliakadminniamccash
authored
Open Requests with closed requested items (#99)
* 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 * Update README.md Open Requests with closed requested items * Check that finds open Requests for which all the requested items are closed * Delete ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_22407c16473d35103899fa37536d43e3.xml --------- Co-authored-by: admin <[email protected]> Co-authored-by: niamccash <[email protected]>
1 parent 2f2358c commit 8e9aff8

File tree

3 files changed

+55
-1
lines changed

3 files changed

+55
-1
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ Identify role assignments (sys_user_has_role) for users that do not exists
118118
### Check the incidents that are closed or canceled but still active
119119
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.
120120

121+
122+
### Open Requests with closed requested items
123+
If all the requested items in a request are closed, the request should close automatically. If the request does not close automatically, probably the flows of the items do not set the stages correctly, or the default Stages for requested items were changed and the Completed Stage does not have the correct value. This can display the active requests that actually are closed in reports and also can cause confusion for users who will see their requests still open.
124+
121125
### Integration users shouldn't be admin
122126
Finds integration users that have assigned admin role - there are two types:
123127
- webapi with a flag: Web service access only | web_service_access_only
@@ -139,6 +143,7 @@ It can cause except issue with manageability also some performance impact - to v
139143
For the dashboard there should be an active owner who can administer/customize/adjust dashboards.
140144
During the time it can be a situation that person is no longer active in the system. It can be discovered and fixed with new person.
141145

146+
142147
## Category: Upgradability
143148

144149
### Call GlideRecord using new
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
hnVNxV4r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ySakyd6tZH77eSw-RrwA6ueT5PFOcxGNYClWObiJsh3NHPIlInLAvXGqERM6eKKNSU1JydHscT0cmuiN9n1c2bi3b_aQMqBfQGGWmrURIOfXESfs46T0CqmSKddCGTL_pVQSdg80OnTQQx18aRHnvec4w71-1Nx_P8DE8-zH3skoPLHb6LLT0_ZeriWUYc0sK7hV2LokeDkxSSv_F0gpd-CF8J1cwNVmPSm7k7rrrwOfaXoidDuhPNxfWASjLgcB0hfwMECiEx7PXEuTqRcQ3XBNdugPog
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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>true</advanced>
5+
<category>manageability</category>
6+
<conditions table="sc_request">active=true^EQ<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
7+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
8+
</conditions>
9+
<description>If all the requested items in a request are closed, the request should close automatically. If the request does not close automatically, probably the flows of the items do not set the stages correctly, or the default Stages for requested items were changed and the Completed Stage does not have the correct value. This can show wrongly in reports active requests that actually are closed and also can cause confusion for users who will see their requests still open.</description>
10+
<documentation_url/>
11+
<finding_type>scan_finding</finding_type>
12+
<name>Open Requests with closed requested items</name>
13+
<priority>4</priority>
14+
<resolution_details/>
15+
<run_condition/>
16+
<score_max>100</score_max>
17+
<score_min>0</score_min>
18+
<score_scale>1</score_scale>
19+
<script><![CDATA[(function (engine) {
20+
21+
var grReqItem = new GlideRecord('sc_req_item');
22+
grReqItem.addActiveQuery();
23+
grReqItem.addQuery('request', current.getUniqueValue());
24+
grReqItem.query();
25+
if (!grReqItem.hasNext()) {
26+
engine.finding.increment();
27+
engine.finding.setCurrentSource(current);
28+
}
29+
30+
})(engine);]]></script>
31+
<short_description>Check that finds open Requests for which all the requested items are closed</short_description>
32+
<sys_class_name>scan_table_check</sys_class_name>
33+
<sys_created_by>admin</sys_created_by>
34+
<sys_created_on>2023-10-23 20:54:58</sys_created_on>
35+
<sys_id>df3c9331470271103899fa37536d43ca</sys_id>
36+
<sys_mod_count>0</sys_mod_count>
37+
<sys_name>Open Requests with closed requested items</sys_name>
38+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
39+
<sys_policy/>
40+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
41+
<sys_update_name>scan_table_check_df3c9331470271103899fa37536d43ca</sys_update_name>
42+
<sys_updated_by>admin</sys_updated_by>
43+
<sys_updated_on>2023-10-23 20:54:58</sys_updated_on>
44+
<table>sc_request</table>
45+
<use_manifest>false</use_manifest>
46+
</scan_table_check>
47+
<sys_translated_text action="delete_multiple" query="documentkey=df3c9331470271103899fa37536d43ca"/>
48+
</record_update>

0 commit comments

Comments
 (0)