Resolved Incident

This is an example custom task for resolving an incident directly with a single click.

/* Resolve Incident */
app.custom.formTasks.add('Incident', 'Resolve Incident', function (formObj, viewModel) {
	function ResolveIncident (incident) {
		console.log("Setting incident to 'Resolved'...");
		incident.Status.Id = "2b8830b6-59f0-f574-9c2a-f4b4682f1681"
		incident.ResolutionDescription = "This Incident was resolved by the resolve incident task."
		incident.ResolutionCategory.Id = "c5f6ada9-a0df-01d6-7087-6b8500ca6c2b";   
		incident.ResolvedDate = new Date().toISOString().split(".")[0];
		
		console.log("Incident set to 'Resolved', refreshing header and awaiting save..");
		$('#statusname').html('Resolved');
	}
	
	ResolveIncident(viewModel);
});

Download the attached .zip file below.

UPDATE BY Geoff Ross:

This customisation has been superseded by the Resolve IR Task Add-In.

https://kb.cireson.com/article/user-guide-add-in-resolve-ir-task/2586

1
12 replies