We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b80e4fc commit 3c47d5bCopy full SHA for 3c47d5b
Server-Side Components/Cascade Priority Change from Parent to Child Incidents/code_snippet.js
@@ -0,0 +1,16 @@
1
+// Below script automatically updates the priority of all child incidents whenever the parent incident’s priority is modified.
2
+(function executeRule(current, previous /*null when async*/ ) {
3
+
4
+ if (current.priority != previous.priority) {
5
+ var childInc = new GlideRecord('incident');
6
+ childInc.addQuery('parent_incident', current.sys_id);
7
+ childInc.query();
8
9
+ while (childInc.next()) {
10
+ childInc.impact = current.impact;
11
+ childInc.urgency = current.urgency;
12
+ childInc.work_notes = 'Priority updated automatically from parent incident ' + current.number;
13
+ childInc.update();
14
+ }
15
16
+})(current, previous);
0 commit comments