Enable Mandatory capture of reason in Work Notes when an incident is reopened.

nameisnani
Mega Sage

Hi Team , 

 

can any one please help me on this requriement 

 

Enable Mandatory capture of reason in Work Notes when an incident is reopened.

 

request is to ensure that whenever an incident is moved from Resolved to In Progress that is reopened by the caller or operate team, the system automatically should prompt the user or operate team to enter the reason for reopening, which should populate in the Work Notes field.

 

The incident should not be allowed to transition from Resolved to In Progress unless the reopening reason is mandatorily filled.

 

nameisnani_0-1778651218584.png

 

 

current OOB behaviour - if we click on reopen ui action - ' additonal commentss ' getting mandtory .

 

can any one pllease help me here

1 ACCEPTED SOLUTION

@nameisnani,

 

The OOB script copy I made in PDI that is overriden on OOB is moving to In progress after work notes are filled and reopen is clicked again.

 

Regards,

Ehab Pilloor

View solution in original post

8 REPLIES 8

Ehab Pilloor
Mega Sage

Hi @nameisnani,

 

You can make a copy of OOB UI Action Reopen and make the change from comments to work_notes in the script.

 

Override OOB Reopen with this UI action and you should be good. I have checked in PDI, it works as per your requirement.

 

EhabPilloor_0-1778652941004.png

 

Note: I have suggested to make a copy and override OOB since the said UI action is high risk file that can be updated in future release.

 

If this information proves useful, kindly mark it as helpful or accepted solution.

 

Regards, 

Ehab Pilloor

 

Bhavya11
Kilo Patron

Hi @nameisnani ,

 

It would require to modify the UI Action.

Goto UI Action open 'Reopen' action and instead of comment make work note mandatory 

 

 

 

 

If this information proves useful, kindly mark it as helpful or accepted solution.

Thanks,
BK

pururavasin
Tera Contributor

Hello, 

 

You can include the following script in the *Reopen* UI action and test:

 

function onClick() {

    // Check if the Incident state is being set to "Reopened"

    if (current.state == 2) { // Assuming '2' is the value for 'In Progress'

        

        // Validate if Work Notes are empty

        if (current.work_notes == '' || current.work_notes == null) {

            gs.addErrorMessage('Work Notes are mandatory when reopening an Incident.');

            current.setAbortAction(true); // Prevents the record from saving

        }

    }

}

 

Thank you.

@pururavasin could you please provide complete steps