Skip to content

Commit ee788f1

Browse files
code_snippet.js
1 parent acf0dd4 commit ee788f1

File tree

1 file changed

+9
-0
lines changed
  • Server-Side Components/Business Rules/Auto-assign Incident to Last Engineer Who Worked on CI

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This script auto-assign Incident to Last Engineer Who Worked on CI.
2+
// Before Business Rule on incident
3+
(function(current, previous){
4+
var hist = new GlideRecord('incident');
5+
hist.addQuery('cmdb_ci', current.cmdb_ci);
6+
hist.orderByDesc('resolved_at');
7+
hist.query();
8+
if (hist.next()) current.assigned_to = hist.resolved_by;
9+
})(current, previous);

0 commit comments

Comments
 (0)