When a user closes incident, auto fill resolution code and resolution notes

maymunTesm
Kilo Expert

When a user chooses to close their incident from the portal, is it possible to make the resolution code and resolution notes be auto-filled with specific details? At the moment, the incident is just being resolved without either notes or code, which is not ideal when reporting

1 ACCEPTED SOLUTION

maymunTesm
Kilo Expert

Ended up doing this:



(function executeRule(current, previous /*null when async*/) {


// Add your code here
gs.log("Test");
current.u_resolution_notes="No longer required - Incident set to Resolved by Customer";
current.update();


current.u_resolution_code = "Unresolved - Closed by Customer";
current.update();

})(current, previous);


View solution in original post

9 REPLIES 9

Hi Maymun,



Try using something as below



find_real_file.png



If you have some defined choices for resolution code you can set it in the Action tab


find_real_file.png



Else you can have a script written for the same as below


(function executeRule(current, previous /*null when async*/) {



// Add your code here


current.resolution_notes='ABC';   //considering resolution notes is the field dictionary name for Resolution Notes


current.resoltion_code='XYZ'; //considering resolution code is the field dictionary name for Resolution Code


current.update();


})(current, previous);


Hi Maymun



You could have the BR conditions set to the following:



- State changes to Closed


& - Resolution code is empty


& - Resolution notes is empty



You could also use something like Closed by is same as Caller if the above conditions are including too much.



Hope this helps



Matt




Right, i've gone for this:



find_real_file.png


I think you may need to select 'Update' too.



Matt


maymunTesm
Kilo Expert

Ended up doing this:



(function executeRule(current, previous /*null when async*/) {


// Add your code here
gs.log("Test");
current.u_resolution_notes="No longer required - Incident set to Resolved by Customer";
current.update();


current.u_resolution_code = "Unresolved - Closed by Customer";
current.update();

})(current, previous);