- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2024 11:21 AM
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
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:16 AM - edited 11-28-2024 04:27 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 02:11 PM
Works for us! Short and sweet, I knew it had to be just a small change somewhere. Thanks for digging into it!