Reopened Incident needs to assign to group instead of original assignee.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2013 12:20 PM
When a client responds to a resolved incident, via link to service now, the incident reopens under the original ITIL assignee. Since we have a Service Desk with only part-time student workers, we need this to assign back to the group and clear the assigned_to field. Should I do this as a business rule? Scripting suggestions?
Thanks!
Shannon V.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2013 02:17 PM
Depends on exactly what you want. If you want to clear the Assigned to "only" if the Caller re-opens the ticket, then I would suggest you modify the "Update Incident (BP)" Inbound Email Action (System Policy \ Inbound Actions) and the "Reopen Incident" UI Action.
There's a bit of code near the top of the Inbound Email Action that checks to see if the ticket should be re-opened. Add
to the script to end up with:
current.assigned_to = "";
if (email.subject.toLowerCase().indexOf("please reopen") >= 0) {
current.assigned_to = "";
current.incident_state = "2";
current.work_notes = "The caller did not feel that this issue was resolved";
}
Do the same thing to the serverReopen() function in the "Reopen Incident" UI Action:
function serverReopen() {
// Set Incident state to active, update and reload the record
current.assigned_to = "";
current.incident_state = 2;
current.update();
gs.addInfoMessage(gs.getMessage("Incident reopened"));
action.setRedirectURL(current);
}
This allows your ITIL users to re-open a ticket and re-assign it to someone at the same time. If, however, you want to clear the field regardless of how it is re-opened, then a simple "before" Business Rule will do the trick:
Name: Clear Assigned to on Reopen
Table: Incident
When: before
Update: Checked
Condition: previous.incident_state == 6 && current.incident_state == 2
Script:
(function(){
current.assigned_to = "";
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2013 02:44 PM
Thanks, Jim! I should be a bit more precise. We've turned off inbound email for a couple of reasons, so the user will have to click a link to the incident and log into Service Now and open the ticket again. We'd of course like only the caller to be able to do this so I'm thinking I'll need to make sure I have code that verifies the person updating the ticket is the caller. Does that make sense?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2013 02:59 PM
The UI Action has a condition so it will only appear for users without a role, and users without a role can only see they're own tickets, so you should be safe. Unless of course you've changed something there as well 🙂
But to be safe, you could modify the condition on the UI Action to be:
current.incident_state == 6 && current.caller_id == gs.getUserID()