Do the IncidentState constants in our instance have an incorrect value?

aspeed
Giga Contributor

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?

5 REPLIES 5

Ahmmed Ali
Mega Sage

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

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Thank you Ali, I saw the same read-only protection level message on the Script Include record. I wonder why our instance has a different value for CANCELED. We’re on Kingston Patch 6, what version is your instance?

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

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

The IncidentStateSNC Script Include has no Update Versions which is odd. I will contact HI support to see if an update is available.