The CreatorCon Call for Content is officially open! Get started here.

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

Please let me also know the update from HI support. Thank you.

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

Thank you,
Ali