Skip to content

Commit dc0442a

Browse files
author
admin
committed
Instead of using GlideRecord unnecessarily, made use of the table filters. This has improved the efficiency and optimized the run time as well.
1 parent 4f91aaf commit dc0442a

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
UyeJAZLOPzkqTZioReDZ3QqkmprUdOX4RrzwUqB3iBIUZXID2pxZdDd8-zzVgJ8zrY3LhCdiW5tdvLasslCHZd532Pq7cRCZZuHLjQ-iJ8wlTMmybRT2u-1I429W1lv-sjEOZqeo3oo_RPq12pyxgtGJLOW5I9cPTZrOnLp6VxT4LSRCeliudBQ_8CwylpHtVIGiRDXrerTEk9jAitMPfkJu6qpO-UxLWs0UGIdOZQBmqpOWMww9NtzjI3azrpbzkSBYvqyKR-SJaiDrk77xyN7jfAMg7IZcWd4umGYlrfmLjI_SNPLuLZYpPXAMpjOMd_cAjzh1_R3279D26M9aA0JdhPUNTIJYgn_qht0i8GR249Wx72B57wY8Oi7IhDJYg4guUFeAzK16zCfqGS0ATMaRXHejSgTXZUGe6hm0emFqvHRiYOsS9EmHoJSXCi59YopRy3yIbsaw3-IN2yVOKQiLr41KqxL-M_rD6oYVN3rvS1DQ9IPEzuR6ezCIhY02LP8DvqPF9I33GgUjsGyDk8HYttR-2bQaItpfJz3StKRG6r7oMpaZ_Rp-aUlD4o-TgzUlYGCvSSwqk7IqCFP44WCjVj7Z9AieehbONdFJsMxgTCuWvgmobMRHp5O98ZdyNhoYN_28qSCuRYMOzmwE1ZBVObCNKBS6VyF5P8qCxqw
1+
UBvFrDYpp6F473PapuKpJKvmmOUFgHEiVD5h695pnIT46m0IVAx59x1ktpNoZWBTXgM7AdJP1coxhN00Shmw9bNXm_HzYL92UD4dYmuICsujNrQr31qwCPeozLHR3BkzlPvWytL5BfPWcqGU-XSsarhtGPDjxgC2FP4hthcVI3uLDUY6HVQ8NAuLvOL3sEcCUuAMpVy6ZZjVZMVULf47a0Q8uS3aVM-Nn2UB4i5ifDA10sVReTr6N9HxC3A54aCwdMBDEY8krcVl7O_2q2QNS2UPoXc2Os0PxlJCzfBZYgvdq2Wa07TUEPv9hM_Gd-MYKC_9tJpmGuiIwkdUKo1Sdg0zrfTBq5bK03aonAUQ3YohDTcbHXyDJ0vXycn1eb4wgzzgZwlY5yILELwfm3t4_A1KYANrO3IC_ImJNe3nj8GGhuKVhdAVxfbrfjmcredgTeCIY5AyzzhR815b2zX0PPxvYYJOIVTajm6GWIH8yvUwV5q1lSrMYHw4nDIRsDUjH30qpg7EIV4ivBtO-lrCmwbXCsv6wpXJWqbtReK82OCZEWN3ovn1RYThAD55WAJkMt40_D0X7t1afak0eKUDTDK_V8lSQSeZ9d_D6cMtr2QlgZgHxX7jdmkn8KK0f9TCa07z4J5s4TJUFUxkriPZDimd3NcG3gpIJzV3AJOgqeE

ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_7334dda283455210ae0854b6feaad378.xml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<active>true</active>
44
<advanced>true</advanced>
55
<category>manageability</category>
6-
<conditions table="incident">active=true^EQ<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
6+
<conditions table="incident">active=true^assignment_group=^EQ<item endquery="false" field="active" goto="false" newquery="false" operator="=" or="false" value="true"/>
7+
<item endquery="false" field="assignment_group" goto="false" newquery="false" operator="=" or="false" value=""/>
78
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
89
</conditions>
910
<description>Tickets from tables such as Incident, Change Request, Problem, and other task-related tables should always have an Assignment Group specified. These tickets represent issues or requests that require attention and action. Leaving the Assignment Group field empty can result in unresolved issues or delays in implementing fixes, as no team will be accountable for the resolution. Since the Assignment Group is meant to designate the responsible team for managing these tickets, it should never be left blank.</description>
@@ -17,27 +18,30 @@
1718
<score_min>0</score_min>
1819
<score_scale>1</score_scale>
1920
<script><![CDATA[(function(finding, current) {
20-
var IncID = current.getValue('sys_id');
21-
var inc = new GlideRecord('incident');
22-
inc.addQuery('sys_id', IncID);
23-
inc.addEncodedQuery("assignment_group!=null");
24-
if (!inc.hasNext()) {
25-
finding.increment();
26-
}
21+
//var IncID = current.getValue('sys_id');
22+
// var inc = new GlideRecord('incident');
23+
// inc.addQuery('sys_id', IncID);
24+
// inc.addEncodedQuery("assignment_group!=null");
25+
// if (!inc.hasNext()) {
26+
// finding.increment();
27+
// }
28+
//if(current.assignment_group!=null){
29+
finding.increment();
30+
//}
2731
})(finding, current);]]></script>
2832
<short_description>Tickets from Incident table should have assignment group specified.</short_description>
2933
<sys_class_name>scan_table_check</sys_class_name>
3034
<sys_created_by>admin</sys_created_by>
3135
<sys_created_on>2024-10-07 18:22:05</sys_created_on>
3236
<sys_id>7334dda283455210ae0854b6feaad378</sys_id>
33-
<sys_mod_count>9</sys_mod_count>
37+
<sys_mod_count>12</sys_mod_count>
3438
<sys_name>Check for Orphaned tickets</sys_name>
3539
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
3640
<sys_policy/>
3741
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
3842
<sys_update_name>scan_table_check_7334dda283455210ae0854b6feaad378</sys_update_name>
3943
<sys_updated_by>admin</sys_updated_by>
40-
<sys_updated_on>2024-10-07 18:33:38</sys_updated_on>
44+
<sys_updated_on>2024-10-09 06:30:13</sys_updated_on>
4145
<table>incident</table>
4246
<use_manifest>false</use_manifest>
4347
</scan_table_check>

0 commit comments

Comments
 (0)