File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
UI Actions/Set Incident Priority Critical Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ Set Incident Priority Critical
2
+
3
+ This UI Action sets current incident record as priority as Critical.
4
+
5
+ When clicked
6
+ Below Conformation message will be displayed to the user as below
7
+ "Are you sure you want to set priority as Critical?"
8
+
9
+ If user selects cancel nothing will happen.
10
+
11
+ If user selects confirm then
12
+ a) It sets the Priority of the current Record as 1-Critical by setting Urgency and Impact as 1-High.
13
+ b) It also sets 'assigned_to' field as 'logedin user'.
14
+ c) It also upends the description as "Priority is set to Critical by 'logedin User'".
15
+
16
+ ** Please note that it changes field values only on the form that is client side.
17
+ Unless you submit or update the record, field values will not be updated in the database table records.
18
+
19
+ You can use this as reference to set other field values as well.
Original file line number Diff line number Diff line change
1
+ // Call this function from OnClick field of UI Action form
2
+ function ClientSideScript ( ) {
3
+ var answer = confirm ( "Are you sure you want to set priority as Critical?" ) ;
4
+ if ( answer == true ) {
5
+ g_form . setValue ( 'assigned_to' , g_user . userID ) ;
6
+ g_form . setValue ( 'impact' , 1 ) ;
7
+ g_form . setValue ( 'urgency' , 1 ) ;
8
+ g_form . setValue ( 'description' , g_form . getValue ( 'description' ) + "\nPriority is set to Critical by " + g_user . getFullName ( ) ) ;
9
+ }
You can’t perform that action at this time.
0 commit comments