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-28-2018 05:29 PM
As i am able to see in my instance, IncidentStateSNC SI is read only based on protection policy.
and below is the actual code in the SI.
var IncidentStateSNC = Class.create();
IncidentStateSNC.NEW = "1";
IncidentStateSNC.IN_PROGRESS = "2";
IncidentStateSNC.ACTIVE = IncidentStateSNC.IN_PROGRESS;
IncidentStateSNC.ON_HOLD = "3";
IncidentStateSNC.AWAITING_PROBLEM = IncidentStateSNC.ON_HOLD;
IncidentStateSNC.AWAITING_USER_INFO = IncidentStateSNC.ON_HOLD;
IncidentStateSNC.AWAITING_EVIDENCE = IncidentStateSNC.ON_HOLD;
IncidentStateSNC.RESOLVED = "6";
IncidentStateSNC.CLOSED = "7";
IncidentStateSNC.CANCELED = "8";
IncidentStateSNC.prototype = {
initialize: function() {
},
type: 'IncidentStateSNC'
};
if you can update the SI then it is good. else update the BR condition accordingly.
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 07:17 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2018 01:13 AM
Hello,
my instance is also on Kingston patch 6.
Please check if version history is available for the script include to check when it changed.
also connect with HI Support to update the values in script include.
Thanks,
Ali
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2018 05:41 AM