diff --git a/Background Scripts/UpdatePriorityBasedOnImpact.js b/Background Scripts/UpdatePriorityBasedOnImpact.js new file mode 100644 index 0000000000..a69e719c7c --- /dev/null +++ b/Background Scripts/UpdatePriorityBasedOnImpact.js @@ -0,0 +1,15 @@ + +var gr = new GlideRecord('incident'); +gr.addQuery('active', true); +gr.addQuery('impact', '2'); +gr.query(); +while (gr.next()) { + + if (gr.impact == '2') { + gr.priority = '1'; + } else { + gr.priority = '2'; + } + gr.update(); +} +