Do the IncidentState constants in our instance have an incorrect value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 03:04 PM
We recently observed that Incidents set to the Canceled status were remaining Active. While investigating I reviewed the Incident mark_closed business rule and noticed its condition was set to current.incident_state == IncidentState.CLOSED || current.incident_state IncidentState.CANCELED. Curious, I opened the IncidentState Script Include and found the following:
var IncidentState = Class.create();
IncidentState.NEW = IncidentStateSNC.NEW;
IncidentState.IN_PROGRESS = IncidentStateSNC.IN_PROGRESS;
IncidentState.ACTIVE = IncidentStateSNC.ACTIVE;
IncidentState.ON_HOLD = IncidentStateSNC.ON_HOLD;
IncidentState.AWAITING_PROBLEM = IncidentStateSNC.AWAITING_PROBLEM;
IncidentState.AWAITING_USER_INFO = IncidentStateSNC.AWAITING_USER_INFO;
IncidentState.AWAITING_EVIDENCE = IncidentStateSNC.AWAITING_EVIDENCE;
IncidentState.RESOLVED = IncidentStateSNC.RESOLVED;
IncidentState.CLOSED = IncidentStateSNC.CLOSED;
IncidentState.CANCELED = IncidentStateSNC.CANCELED;
which drove me to the IncidentStateSNC Script include where I found the following:
var IncidentStateSNC = Class.create();
IncidentStateSNC.NEW = "1";
IncidentStateSNC.ACTIVE = "2";
IncidentStateSNC.IN_PROGRESS = "2";
IncidentStateSNC.ON_HOLD = "3";
IncidentStateSNC.AWAITING_PROBLEM = "3";
IncidentStateSNC.AWAITING_USER_INFO = "4";
IncidentStateSNC.AWAITING_EVIDENCE = "5";
IncidentStateSNC.RESOLVED = "6";
IncidentStateSNC.CLOSED = "7";
IncidentStateSNC.CANCELED = "7";
Is it correct that the CLOSED and CANCELED states have the same value? I think the following should be true:
IncidentStateSNC.CANCELED = "8";
Should I correct the constant value for IncidentStateSNC.CANCELED?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2018 09:47 AM
Please let me also know the update from HI support. Thank you.
Thank you,
Ali