We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to auto-change Incident state from On Hold to In Progress on reassignment and make Work Notes ma

nameisnani
Giga Sage
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!
11 REPLIES 11

Hi @nameisnani 

 

In the client script , add a IF condition when old value not equal to new value , then set Work notes mandatory. do it for the both the script and share the result.

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

nameisnani
Giga Sage

@yashkamde @Tanushree Maiti 

 

 

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);