From 8bc15bb5256589104edeb6d1c745478b9830c3b1 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 30 Oct 2024 13:17:22 -0700 Subject: [PATCH 1/2] Created the following three new Table check scan rules. --- ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt | 2 +- ...check_01c1c08ec3a19610afa6fc84e401310d.xml | 52 +++++++++++++++++++ ...check_03173371c3a19610afa6fc84e40131af.xml | 41 +++++++++++++++ ...check_a8d2377dc3619610afa6fc84e4013135.xml | 42 +++++++++++++++ 4 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_01c1c08ec3a19610afa6fc84e401310d.xml create mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_03173371c3a19610afa6fc84e40131af.xml create mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_a8d2377dc3619610afa6fc84e4013135.xml diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt index c065425..fb90577 100644 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt @@ -1 +1 @@ -2GkIkYTRLHBrnaK0BLk-XjxdsvdTIZ9jJdpNRMX35K_6xuWTi5y1Ry99K-DOjlG11wqAiWwvl7aCdE4ZWrSiATbI0lxnUdQ9WxlKwYNvs1x4VCYSXFOyYvTvKT3kiAZAzCrckOa4Em4EIaQWsrb_I8Hs0bgKv33rj-ePUrlm_eyaKJ2rnW23umP3MLy86FEu-J5jxkDLisX7iqlAtjOoRsUQBweQsMoxupOYvfpdE9hb2_IVDL9CoKdTg80_4ggyJ8PNBz0-61EPdmnU7cRKcwrgivmxrwlsMZRJ1uYb2HSI-uveGE4A7AF1o6mBZIz6ssbtFd7EiA0adaGXD5P15jiG014hPjkYP4HKiiA0_Yjt6wL60LGi3OSCJ9gd8YGeijcceUhadJ8o7-_9kKB87bMrCZLimt0eMOU9IP8roKLd8mrCC7yROA1N93b861zaMf9Rya_aFIMJAxF42hodGemepQf6byCLRA_-rQf6UZS9gCn3BUKuaXq3SQ-zJZRa8abRZPslmATdHB_qc3qD-zHdKaau-2U4IjCX5uN8_zJWyiHrskGbzNbjghd7A0IyCLH5cWiIxHZp41YeMQQhXX0ZQyhH8rnFFviKVQkfU9MEVdpqhBTLKe5B0bM5sXYhejFEzKJayrE0FcpgYQhxsN3AyPQpH5w62LMaCkTbugU \ No newline at end of file +O2Z77o9EFursYt1K07qAJxi1q3toSYYu845IcvgRCRP4mg_d8i7G2DvNCJKO6ugMMGVksnwGH69Ehft-qk2O8iHVVDabTYaW9VKCNnoQcWSVwgxYRcCDy7HuepXLHyPfWsKqfatmB3M2GgXO7DTcACLGNuHcf9vLnMSYe168U5lIa7Tt-_3hiWXYwRNRESs10QXHznJ5kkeQjwbZa7ux3ttV15daavjwyejh6wImpTbsAxPwapNgC-klYerXPNmzqoeb7-QLAZnoQ7pvMywmGKjCdFd-3rX4Bnq3O9IdTdKW5hYgdOpj1rlJBYSLiJ6UyOpE3-OURcENQJjo_AV9wSrubWgIfakHA3jkEPUqb256GiDV0aMOXdWxu2wF3gmxVOZLHYGc3c1orSE8WhdDkTatOBiXSsAcwk4SX25-1g0S5rqD5Hq598i8WJGpUzTEcF5rCZ0LPzsgcaWIlVTKJozgTLPvKEbtfXnXzqtGWeKBTCgU2ewKZpwUJkEw3D4wHvg83WstSNngYClZ9cM3PSi-KhlJLq-nJvCdyRm9o7SBZrwufXwmB72lcC3CaJsvL8ll5qPBfyg0MQUySD8q9az-BkOnqjdYAjBJHwdsN6rtqPGtv8sRQU5iPEQi8rWKrmGGLG404fT-Z9SkAl-iIjX34j3INxlYsgBwJQiQo_w \ No newline at end of file diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_01c1c08ec3a19610afa6fc84e401310d.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_01c1c08ec3a19610afa6fc84e401310d.xml new file mode 100644 index 0000000..04a001a --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_01c1c08ec3a19610afa6fc84e401310d.xml @@ -0,0 +1,52 @@ + + + true + true + manageability + state=in progress^ORstate=complete^EQ + + + + Usually, developers mark an updatesets as Ignore if the work done is not required to be promoted or incorrect or irrelavent or due to any other reasons. +However, at times, some of the developers may use the ignored set for any active work instead of creating new one by updating the state from Ignore to In-Progress. It is not a good practice to do the same. It may case the deployment issues and also makes the troubleshooting process cumbersome. +It may also impact the deployment and cause issues in case if the state is changed to In-Progress/Completed for the potential ignored sets. + + scan_finding + Update set In Progress/Completed previously Ignored + 3 + It is always good and recommended to create a new updateset instead of using already Ignored updatesets by changing the state from Ignore to In-Progress/Completed. + + 100 + 0 + 1 + + Already Ignored Update Set shouldn't be set back to In Pogress/Completed. + scan_table_check + admin + 2024-10-30 19:28:34 + 01c1c08ec3a19610afa6fc84e401310d + 0 + Update set In Progress/Completed previously Ignored + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_01c1c08ec3a19610afa6fc84e401310d + admin + 2024-10-30 19:28:34 + sys_update_set
+ false +
+
diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_03173371c3a19610afa6fc84e40131af.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_03173371c3a19610afa6fc84e40131af.xml new file mode 100644 index 0000000..ed3f44a --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_03173371c3a19610afa6fc84e40131af.xml @@ -0,0 +1,41 @@ + + + true + false + manageability + scriptNOT LIKEfunction^EQ + + + In general, an advanced busiess rule will wrap your code in a function, and it is important that this guideline is followed. When code is not enclosed in a function, variable and other objects are avilable to all other server-side scripts. This availability can lead to unexpected consequences that are difficult to troubleshoot. + + scan_finding + Always keep code/snippet in functions - Business Rules + 2 + If you have already written code without function in any business rule, move the code by having the function. +If you create any new business rule, please ensure to write code inside of a function rather writing it directly in script field. + + 100 + 0 + 1 + + Keep code in functions - Business Rules + scan_table_check + admin + 2024-10-30 18:42:01 + 03173371c3a19610afa6fc84e40131af + 1 + Always keep code/snippet in functions - Business Rules + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_03173371c3a19610afa6fc84e40131af + admin + 2024-10-30 18:48:42 + sys_script
+ false +
+
diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_a8d2377dc3619610afa6fc84e4013135.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_a8d2377dc3619610afa6fc84e4013135.xml new file mode 100644 index 0000000..d465fa6 --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_a8d2377dc3619610afa6fc84e4013135.xml @@ -0,0 +1,42 @@ + + + true + false + performance + scriptLIKEGlideRecord^EQ + + + Catalog Client script should be using GlideAjax if you need to make asyc calls to Server to get data from Server. GlideRecord() API shouldn't be used to avoid performance issues. + + scan_finding + DO NOT USE GlideRecord API in catalog client script + 2 + Catalog Client scripts run on browser and they uses either data available on the form or data retrieved from the database. +Use client data as much as possible to eliminate the need for time-consuming server lookups i.e. GlideRecord. +The best ways to get data into form/browser from the database are g_scratchpad, and asynchronous GlideAjax lookup + + 100 + 0 + 1 + + Catalog Client script with GlideRecord API calls + scan_table_check + admin + 2024-10-30 18:23:17 + a8d2377dc3619610afa6fc84e4013135 + 0 + DO NOT USE GlideRecord API in catalog client script + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_a8d2377dc3619610afa6fc84e4013135 + admin + 2024-10-30 18:23:17 + catalog_script_client
+ false +
+
From 9fe0ae8ed6f202124416cfddfcd562863abb129d Mon Sep 17 00:00:00 2001 From: vijaytalupula <30828543+vijaytalupula@users.noreply.github.com> Date: Thu, 31 Oct 2024 01:50:24 +0530 Subject: [PATCH 2/2] Update README.md Updated the README.md file with below 3 following additions, 1. Under manageability category, - Always keep code/snippet in functions - Business Rules. - Update set In Progress/Completed previously Ignored. 2. Under performance category, - Catalog Client script with GlideRecord API calls. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index ef092d6..4f7e4b8 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,15 @@ Tickets from tables such as Incident, Change Request, Problem, and other task-re ### Check Inactive Business Rules over 90 days Inactive Business Rules which are not updated for more than 90 days and not created by glide.maint and not updated by admin should be identified to remove unnecessary overhead. +### Always keep code/snippet in functions - Business Rules +In general, an advanced busiess rule will wrap your code in a function, and it is important that this guideline is followed. When code is not enclosed in a function, variable and other objects are avilable to all other server-side scripts. This availability can lead to unexpected consequences that are difficult to troubleshoot. + +### Update set In Progress/Completed previously Ignored +Usually, developers mark an updatesets as Ignore if the work done is not required to be promoted or incorrect or irrelavent or due to any other reasons. +However, at times, some of the developers may use the ignored set for any active work instead of creating new one by updating the state from Ignore to In-Progress. It is not a good practice to do the same. It may case the deployment issues and also makes the troubleshooting process cumbersome. +It may also impact the deployment and cause issues in case if the state is changed to In-Progress/Completed for the potential ignored sets. + + ## Category: Upgradability ### Call GlideRecord using new @@ -332,6 +341,9 @@ Unpublished knowledge articles may contain sensitive information that should not ### Scripts in ACLs should be cleared when Advanced is not checked Scripts in ACLs ARE executed regardless of whether or not the Advanced checked box is checked off. As such, unnecessary scripts should be cleared from the field OR the Advanced checkbox should be checked in cases where scripts are required to provide better visibility to admins for troubleshooting purposes. +### Catalog Client script with GlideRecord API calls +Catalog Client script should be using GlideAjax if you need to make asyc calls to Server to get data from Server. GlideRecord() API shouldn't be used to avoid performance issues. + ## Category: User Experience ### Added a Number Prefix which already exists