How to auto-change Incident state from On Hold to In Progress on reassignment and make Work Notes ma
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi Team,
I need guidance on implementing the following requirement in ServiceNow Incident Management:
Requirement:
When an Incident is currently in "On Hold" state and the ticket is reassigned (Assignment Group or Assigned To changes), the system should automatically update the State to "In Progress".
Additionally, during this transition, "Work Notes" should be made mandatory to ensure proper documentation of the reassignment activity.
Details: -
Current State: On Hold - Action: Reassignment (Assignment Group or Assigned To changes)
- Expected Behavior:
1. Incident State should automatically change to "In Progress"
2. Work Notes field must be mandatory during this update
If anyone has implemented a similar requirement, please share your approach.
please provide me the configuration steps to achieve thsi requirment
Thanks in advance for your help!
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
I have written below Business rule - before update - it is working fine , but the problem is reassignment avitiies is not showing in activite logs in incident .
(function executeRule(current, previous) {
// Run only on update
if (current.operation() !== 'update') {
return;
}
// Check if reassignment happened
if (current.assignment_group.changes()) {
// Requirement 2: Work notes mandatory for any reassignment
if (gs.nil(current.work_notes)) {
gs.addErrorMessage(
'Work notes are mandatory when reassigning an incident.'
);
current.setAbortAction(true);
return;
}
// Requirement 1: If previous state was On Hold, move to In Progress
if (previous.state == 3) { // 3 = On Hold
current.state = 2; // 2 = In Progress
}
}
})(current, previous);