Updating Incident Standard Ticket Actions to add Resolution Notes

TroyVB
Tera Contributor

Hi all,

Apologies if this is a silly question but I have not been able to locate the answer anywhere. The setup for our service portal includes the option for users to 'Resolve' but when selecting it says it requires information for the mandatory fields.

TroyVB_0-1732897828138.png

I have managed to find the code for this in the widget and wanted to add a couple of lines to autopopulate these fields but I cannot edit the code as it is read only.

TroyVB_1-1732897987678.png

I have created a duplicate widget with my edited code but how do I add it to the existing Service Portal widgets? I don't want to change anything else.

Or if there is another option I can configure that, any help is appreciated!

 

My updated code is below:

    //Resolve Action functions
    if (input && input.action == 'resolveIncident' && incidentGr.get(incidentSysId) && hasPermissions(incidentGr, "write")) {
            //sets incident state to resolved
        incidentGr.incident_state = global.IncidentState.RESOLVED;
        incidentGr.state = global.IncidentState.RESOLVED;
            //sets resolved_by to the current user
        incidentGr.resolved_by = gs.getUserID();
            //sets close_code to 'Resolved By Caller'
        incidentGR.close_code = "Resolved by caller";
            //sets u_steps_taken_to_resolve to resolved message
        incidentGR.u_steps_taken_to_resolve = "This incident has been resolved by the caller so no futher action is required";
        data.isIncidentResolved = incidentGr.update();
    }
 
 
1 ACCEPTED SOLUTION

Runjay Patel
Giga Sage

Hi @TroyVB ,

 

Check closer code choice value , seems you are giving display value, you need to pass internal value to close code.

 

Accept the solution if it helped.

View solution in original post

2 REPLIES 2

Runjay Patel
Giga Sage

Hi @TroyVB ,

 

Check closer code choice value , seems you are giving display value, you need to pass internal value to close code.

 

Accept the solution if it helped.

That was it, thank you!