Skip to content

Commit 1709f31

Browse files
script.js
1 parent 5f54136 commit 1709f31

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(function executeRule(current, previous) {
2+
//when the priority field changes
3+
if (current.priority.changes()) {
4+
var task = new GlideRecord('change_task');
5+
task.addQuery('change_request', current.sys_id);//Find all tasks related to this Change Request
6+
task.query();
7+
while (task.next()) {
8+
task.priority = current.priority; //Update the task priority
9+
task.update();
10+
}
11+
}
12+
})(current, previous);

0 commit comments

Comments
 (0)