Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This code_snippet.js script automatically updates the priority of all child incidents whenever the parent incident’s priority is modified.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Below script automatically updates the priority of all child incidents whenever the parent incident’s priority is modified.
(function executeRule(current, previous /*null when async*/ ) {

if (current.priority != previous.priority) {
var childInc = new GlideRecord('incident');
childInc.addQuery('parent_incident', current.sys_id);
childInc.query();

while (childInc.next()) {
childInc.impact = current.impact;
childInc.urgency = current.urgency;
childInc.work_notes = 'Priority updated automatically from parent incident ' + current.number;
childInc.update();
}
}
})(current, previous);
Loading