You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Client Script prevents users from resolving or closing an Incident without adding work notes. It ensures that important resolution details are documented before the ticket is closed.
5
+
6
+
## Features
7
+
- Triggered on form submission.
8
+
- Checks if the Incident state is set to Resolved or Closed.
9
+
- Displays a warning if Work Notes are empty.
10
+
- Prevents form submission until notes are added.
11
+
12
+
## Configuration
13
+
14
+
-**Table**: `incident`
15
+
-**Type**: `onSubmit`
16
+
-**Script Name**: `Warn Before Closing Without Work Notes`
17
+
-**Active**: `true`
18
+
19
+
## Script
20
+
21
+
22
+
function onSubmit() {
23
+
var state = g_form.getValue('state');
24
+
var workNotes = g_form.getValue('work_notes');
25
+
26
+
if ((state == '6' || state == '7') && !workNotes.trim()) {
27
+
alert("Please add work notes before resolving or closing the Incident.");
0 commit comments