116 views

Description

When creating an incident from an alert, the urgency field on the incident form does not reflect the correct severity level.

The script include "EvtMgmtIncidentHandler", function "submiteTask" contains a bug on populating the severity. The following part of the code does not work:
var taskSeverity = (alert.severity === 2 || alert.severity === 1 ) ? alert.severity : '3';
task.setValue('severity', taskSeverity);

Note that:
1. Strict equality (===) is not working in here; taskSeverity is always set to 3. Modifying it to Abstract equality (==) allows the code to work.
2. There is no "severity" attribute inside the task table. The correct attribute where alert severity should be set is "urgency."

Steps to Reproduce

Required user role: evt_mgmt_admin
Required plugin: Event Management

  1. Create an alert with the severity level of Critical.
  2. On the alert form, click Create incident.
    Note that the urgency of the new incident is categorized as Low instead of High

Workaround

Follow one of these two workarounds:

  • Manually update the incident urgency after it is created with the correct Low value
  • Fix the EvtMgmtIncidentHandler script include below.

    Replace:

    var taskSeverity = (alert.severity === 2 || alert.severity === 1 ) ? alert.severity : '3';
    task.setValue('severity', taskSeverity);

    with:

    var taskSeverity = (alert.severity == 2 || alert.severity == 1 ) ? alert.severity : '3';
    task.setValue('urgency', taskSeverity);


Related Problem: PRB697030

Seen In

Helsinki
Helsinki Patch 1

Fixed In

Istanbul

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2016-10-31 08:41:46
Published:2016-07-21