How to make the work notes in an incident mandatory when the assignment group changes

velvet
Mega Guru

Currently when incidents are transferred techs sometimes are not putting in any work notes.   The receiving group can not tell which group the incident came from because there are no notes.

1 ACCEPTED SOLUTION

harshinielath
Tera Expert

Use a Client script and select onChange type for field 'Assignment Group' and write in script like this


g_form.setMandatory('work_notes', true);


View solution in original post

6 REPLIES 6

harshinielath
Tera Expert

Use a Client script and select onChange type for field 'Assignment Group' and write in script like this


g_form.setMandatory('work_notes', true);


Prateek kumar
Mega Sage

Whenever there is a change in the assignment group, it is captured in the activity in the notes section. You just need configure the available fields and bring assignment group from available to selected.


PFA. Let me know if you still have any issues.


community.PNGHello Velvet



Please mark my response as correct and helpful if it helped solved your question.
-Thanks

I have that selected, but we are not getting the information we need.   We want to be able to know show sent the ticket.   If the tech does not put in any notes, then the receiving team does not know who sent it to them in case it was sent to them in error and needs to be sent back.


alinatoc
Giga Contributor

Create an On-Change client-script on top of Assignment Group field with the following script:



var gr = new GlideRecord('incident');
gr
.addQuery('sys_id', g_form.getUniqueValue());
gr
.query(function(_rec) {
   
if (_rec.next()) {
         
// Check if the assignment group is changed prior to form submission
          var assignment_group_changed = _rec.assignment_group.toString() != g_form.getValue('assignment_group');
          g_form
.setMandatory('work_notes', assignment_group_changed);
   
}
});



In a nutshell:


  • Check if the incident's assignment group in the form has been changed by checking the actual record via GR
  • If yes, then set work notes as a mandatory field, otherwise don't