Create a UI action to close multiple incidents

You can create a UI action to close multiple incidents from the Actions choice list in the list view. It adds the same close note to all the incidents being closed, and does not require the list_updater role. Implementing this process also requires a business rule for the UI action to reference and a custom form view.

Before you begin

business_rule_admin (for the business rule), ui_action_admin (for the UI action), or admin

Procedure

  1. Complete the following steps to create the business rule to reference in the UI action.
    1. Navigate to System Definition > Business Rules and click New.
    2. Create the business rule with the following information.
      • Name: close_it
      • Table: Incident [incident]
      • When: after
      • Script: paste the following information.
        current.active = 'false';
        current.short_description = "TEST CLOSE NOTES";
        current.incident_state = '7';
        gs.addInfoMessage("Closing");
        current.update();
    3. Click Submit.
  2. Complete the following steps to create the UI action.
    1. Navigate to System UI > UI Actions and click New.
    2. Create a UI action with the following information.
      • Name: CloseNotes
      • Table: Incident [incident]
      • Action name: close_notes
      • Active, Show insert, Show update, Client, List choice: Select these check boxes.
      • OnClick: showQuickForm('CloseNotes','close_it')
    3. Click Submit.
    The new UI action appears in the Action choice list below the incident list of records.
  3. Complete the following steps to create a form view to use the UI action for closing multiple incidents.
    1. Follow the steps in Create and delete views and include the following information.
      • In the Name, match the first parameter to showQuickForm() in the UI action. In this example, the parameter is CloseNotes.
      • Review and update the fields in the Selected list, ensuring that the Comments and Work notes item is selected.
    2. Save the CloseNotes view.

Result

Service desk agents can close multiple incidents using CloseNotes in the Actions list below the Incident list.