Skip to content

Commit 1ef4fc2

Browse files
code_snippet.js
1 parent 3d58f92 commit 1ef4fc2

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

Server-Side Components/Business Rules/Auto-assign Incident to Last Engineer Who Worked on CI/code_snippet.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55
hist.addQuery('cmdb_ci', current.cmdb_ci);
66
hist.orderByDesc('resolved_at');
77
hist.query();
8-
if (hist.next()) current.assigned_to = hist.resolved_by;
8+
if (hist.next()) {
9+
if(hist.resolved_by.active == true){
10+
current.assigned_to = hist.resolved_by;
11+
}
12+
}
913
})(current, previous);

0 commit comments

Comments
 (0)