Methods to make Resolved = inactive

VernYerem
Tera Expert

I've tried the following without success:

- Modifying the Script include "TaskStateUtil"s  SYSTEM_INACTIVE_STATES to include resolved value (6):

SYSTEM_INACTIVE_STATES : [3, 4, 6, 7], // task default inactive/close states
- Modifying "State"s dictionary Entry Override for incidents to include the resolved value (6):
close_states=6;7;8,default_work_state=2,default_close_state=7,ignore_filter_on_new=true

- Created a Business Rule to make active=false if state=resolved

 

Something that I've done that does work is to change "resolved" numerical values to match "Closed". Changing it to 7 made this work like we want, but it feels like this would cause other issues down the line. 

1 ACCEPTED SOLUTION

Krecker
Tera Expert

In case anyone encounters the same problem, here is what worked for me:

1. Modify "State"s dictionary Entry Override for incidents to include the resolved value (6):

 

close_states=6;7;8,default_work_state=2,default_close_state=7,ignore_filter_on_new=true​

 

 

2. Modify the advanced condition of Business Rule "incident reopen" to:

 

current.incident_state != IncidentState.CLOSED && current.incident_state != IncidentState.CANCELED && current.incident_state != IncidentState.RESOLVED​

 

(the "current.incident_state != IncidentState.RESOLVED​" is newly added)

 

 

"incident reopen" runs after the "TaskStateUtil"/"mark closed" BR and therefore overwrites the active flag if not both are set correctly.


Also refer to this KB-Article:
Incident record remains active after adding new value to the "close_states" dictionary attribute - S...

Also this thread is helpful in case you need to mark a custom state as inactive.
Solved: setting incident to active false - Page 6 - ServiceNow Community

View solution in original post

5 REPLIES 5

Works for us! Short and sweet, I knew it had to be just a small change somewhere. Thanks for digging into it!