How can I fix the standard ticket configuration to resolve it?

ayano
Giga Guru

I get an error like this when I click the Resolve button.

How do I enter the Resolution Code and Close Notes from the ticket page of the Service Portal?

 

find_real_file.png

1 ACCEPTED SOLUTION

Kasi Ramanathan
Kilo Guru

Hi @ayano ,

 

Hard code the Resolution note and Close Code in Incident Standard Ticket Actions.

Navigate to Service Portal --> Widgets.

Search for Incident Standard Ticket Actions. Open the record.

In the server script, hardcode the values for the fields as required.

	/* Actions - Start */
    if (input && input.action == 'resolveIncident' && incidentGr.get(incidentSysId)) {
        incidentGr.incident_state = global.IncidentState.RESOLVED;
		incidentGr.state = global.IncidentState.RESOLVED;
		incidentGr.resolved_by = gs.getUserID();
		incidentGr.close_notes = "Hard Code"; //Change the value as per your requirement
		incidentGr.close_code = "Hard Code"; //Change the value as per your requirement
		data.isIncidentResolved = incidentGr.update();
    }
	

Screenshot:

find_real_file.png

View solution in original post

6 REPLIES 6

Brian Lancaster
Tera Sage

Did you clone the out of the box widget? The only way I can reproduce this is if I make it so I can see incidents where I'm not the caller. An itil user should not be trying to resolve incidents from the portal.

Hi,

Thank you for the reply.

No, I haven't created or cloned the Widget.
I just edited the Standard Ticket configuration.

Part of this feature is a button to change the status. Isn't it okay to update the status from the service portal because it has an action button that is that function?

Thanks and Regards,

Kasi Ramanathan
Kilo Guru

Hi @ayano ,

 

Hard code the Resolution note and Close Code in Incident Standard Ticket Actions.

Navigate to Service Portal --> Widgets.

Search for Incident Standard Ticket Actions. Open the record.

In the server script, hardcode the values for the fields as required.

	/* Actions - Start */
    if (input && input.action == 'resolveIncident' && incidentGr.get(incidentSysId)) {
        incidentGr.incident_state = global.IncidentState.RESOLVED;
		incidentGr.state = global.IncidentState.RESOLVED;
		incidentGr.resolved_by = gs.getUserID();
		incidentGr.close_notes = "Hard Code"; //Change the value as per your requirement
		incidentGr.close_code = "Hard Code"; //Change the value as per your requirement
		data.isIncidentResolved = incidentGr.update();
    }
	

Screenshot:

find_real_file.png

Thakn you so much !!!

I can resolved it !!!