Incident reassignment: auto state change + mandatory work notes (multiple conditions)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hello Community,
We have the following requirements on the Incident table and are looking for the best practice approach.
Requirement 1
When an Incident is reassigned to another assignment group (queue)
AND the current state is On Hold
The state should automatically move to In Progress
Work notes must be mandatory during this reassignment
Requirement 2
When an Incident is reassigned to another assignment group (queue)
Irrespective of the current state
Work notes must always be mandatory
I have used this Before update BR - is there in any issue in mu BR
What is the recommended approach to handle both requirements together?
can anyone please help me with this requriment .
please provide us script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar sure i will test and update you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi,
Use ONE Before-Update Business Rule on Incident.
Logic:
Run only when assignment_group changes
Always require work notes (all states)
If previous state = On Hold → set state = In Progress
✔ Business Rule Script (final)
(function executeRule(current, previous) {
// Run only on reassignment
if (!current.assignment_group.changes()) {
return;
}
// Work notes mandatory
if (!current.work_notes.toString().trim()) {
gs.addErrorMessage('Work notes are mandatory when reassigning an incident.');
current.setAbortAction(true);
return;
}
// If was On Hold, move to In Progress
if (previous.state == 3) { // On Hold
current.state = 2; // In Progress
}
})(current, previous);✔ Why this works
Covers both requirements together
Works for UI, API, email, integrations
No duplicate rules, no UI-policy gaps
This is the correct production approach.
