Skip to content

Set incident as critical priority #1073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions UI Actions/Set Incident Priority Critical/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Set Incident Priority Critical

This UI Action sets current incident record as priority as Critical.

When clicked
Below Conformation message will be displayed to the user as below
"Are you sure you want to set priority as Critical?"

If user selects cancel nothing will happen.

If user selects confirm then
a) It sets the Priority of the current Record as 1-Critical by setting Urgency and Impact as 1-High.
b) It also sets 'assigned_to' field as 'logedin user'.
c) It also upends the description as "Priority is set to Critical by 'logedin User'".

** Please note that it changes field values only on the form that is client side.
Unless you submit or update the record, field values will not be updated in the database table records.

You can use this as reference to set other field values as well.
9 changes: 9 additions & 0 deletions UI Actions/Set Incident Priority Critical/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Call this function from OnClick field of UI Action form
function ClientSideScript() {
var answer = confirm("Are you sure you want to set priority as Critical?");
if (answer == true) {
g_form.setValue('assigned_to', g_user.userID);
g_form.setValue('impact', 1);
g_form.setValue('urgency', 1);
g_form.setValue('description', g_form.getValue('description') + "\nPriority is set to Critical by " + g_user.getFullName());
}
Loading