Skip to content

Commit f285fdd

Browse files
code_snippet.js
1 parent acf0dd4 commit f285fdd

File tree

1 file changed

+10
-0
lines changed
  • Server-Side Components/Business Rules/Auto-calculate Change Implementation Risk Using ML Score

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This script will auto-calculate Change Implementation Risk Using ML Score.
2+
// Call an internal ML score table and set risk.
3+
// Before Business Rule on change_request
4+
(function(current, previous){
5+
var ml = new GlideRecord('u_ml_change_risk');
6+
ml.addQuery('u_signature', current.short_description);
7+
ml.query();
8+
if (ml.next()) current.u_ml_risk_score = ml.u_score;
9+
else current.u_ml_risk_score = 50;
10+
})(current, previous);

0 commit comments

Comments
 (0)