From 31d00df1645de5c0ab596c4f1a445d6681a20b07 Mon Sep 17 00:00:00 2001 From: pallipoina92 <33309804+pallipoina92@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:09:47 +0530 Subject: [PATCH 1/2] Create update_inactive_application_owner.js Update the inactive application owner with their manager. --- Scheduled Jobs/update_inactive_application_owner.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Scheduled Jobs/update_inactive_application_owner.js diff --git a/Scheduled Jobs/update_inactive_application_owner.js b/Scheduled Jobs/update_inactive_application_owner.js new file mode 100644 index 0000000000..140dde52f1 --- /dev/null +++ b/Scheduled Jobs/update_inactive_application_owner.js @@ -0,0 +1,10 @@ +var grApp = new GlideRecord("cmdb_ci_appl"); +grApp.addEncodedQuery("owned_by.active=false"); +grApp.query(); +while(grApp.next()){ +var managerSysId = grApp.owned_by.manager.toString(); // Get Manager SysId +if (managerSysId) { +grApp.owned_by = managerSysId; +grApp.update(); +} +} From 13f6ff4ee1e8e59f5f90d1f1509b283e3106bd64 Mon Sep 17 00:00:00 2001 From: pallipoina92 <33309804+pallipoina92@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:15:04 +0530 Subject: [PATCH 2/2] Create Remove Option from Choice List.js Remove the choice options of Impact & Urgency as 1 if the category is selected as Software --- Client Scripts/Remove Option from Choice List.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Client Scripts/Remove Option from Choice List.js diff --git a/Client Scripts/Remove Option from Choice List.js b/Client Scripts/Remove Option from Choice List.js new file mode 100644 index 0000000000..8c3eed75ce --- /dev/null +++ b/Client Scripts/Remove Option from Choice List.js @@ -0,0 +1,9 @@ +function onChange(control, oldValue, newValue, isLoading, isTemplate) { +if (isLoading || newValue == '') { +return; +} +if (newValue == 'inquiry') { //Onchange of Category +g_form.removeOption('impact', '1'); +g_form.removeOption('urgency', '1'); +} +}