We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca3fe0e commit 29cf78eCopy full SHA for 29cf78e
Server-Side Components/Business Rules/Incident Root Cause Suggestion/business rule.js
@@ -0,0 +1,15 @@
1
+(function executeRule(current, previous /*null when async*/) {
2
+
3
+ // Only run if short_description or description changes
4
+ if (current.short_description.changes() || current.description.changes()) {
5
6
+ var helper = new IncidentRootCauseHelper();
7
+ var suggestions = helper.getRootCauseSuggestions(current.short_description + " " + current.description);
8
9
+ if (suggestions.length > 0) {
10
+ // Store suggestions in a custom field (multi-line text)
11
+ current.u_root_cause_suggestions = suggestions.join("\n");
12
+ }
13
14
15
+})(current, previous);
0 commit comments