- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 02:18 PM
Hello all!
I was recently made a ServiceNow administrator and am very new to the program. Our instance is slowly taking its proper shape as our operators become familiar with the program so we are paying more and more attention to customizable and scriptable aspects of the program.
Recently it was brought to my attention that when an Incident is reopened, the close code and close notes do not return to their default state so when the Incident is closed again (we are circumventing the 'Resolved' state at the moment but will institute it at a later date) it uses the original close code and close notes.
Is there a way, upon Incident reopening, to move the current close notes to a work notes entry and reset the closure information fields to their default state?
-Matt
Solved! Go to Solution.
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 04:31 PM
Oops, you're right. This should work:
current.state.changes() && previous.state == 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 03:04 PM
Hi Matt,
You could use a before update business rule to do this.
The condition would be when the state changes and the state is not closed:
current.state.changes() && current.state != 3
Then in your business rule you would want to copy the close notes and close code to the work notes and clear out those fields:
current.work_notes = "Close code: " + current.close_code + "\nClose notes: " + current.close_notes;
current.close_code = "";
current.close_notes = "";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 04:04 PM
Thank you for the speedy reply!
The scripting is exactly what I was looking for - I do have one concern though and I apologize if I seem thick, but wouldn't this affect other Incidents whose state changed as well? Is there a way to specify tickets whose state changed from closed to something else?
-Matt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 04:31 PM
Oops, you're right. This should work:
current.state.changes() && previous.state == 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2015 11:01 AM
Thank you so much!
(And our operators thank you too)