- 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-16-2015 12:14 PM
I may have spoken too soon. I tried to create this rule but it won't run and, frankly, I'm too new at this to troubleshoot it. Here is the script that I wrote (close value is 6 in our instance):
if ( current.state.changes() && previous.state == 6 )
{
current.work_notes = "Close code: " + current.close_code + "\nClose notes: " + current.close_notes;
current.close_code = "";
current.close_notes = "";
}
I tried to use the built in filters ("When to run" tab) and set the filter to:
Incident State | Changes <and>
Incident State | Changes from | Closed
But that did not work either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 12:17 PM
Could you post a screenshot of the business rule? Is it running Before Update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 12:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2015 12:28 PM
I would move the code out of the if statement into the condition and then try adding a log statement to see if this is even running. Everything looks ok to me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2015 02:26 AM
Something we look for our Incidents if they change from Resolved to active again. Aha got it working now. Thanks !
