Auto update the time stamp when the assignment group is selected in Incident Form

Bhavani13
Tera Contributor

Hi 

Can we have the time stamp auto updated in the new field (Date) when the ticket has been moved to a particular group.

Ex: If the ticket has been assigned to B group from A group, the time stamp when the ticket has been assigned to B group should be auto filled in the new Date field.

 

Can anyone suggest how can I achieve this.

 

Thanks in Advance!

 

Thanks,

Bhavani 

 

5 REPLIES 5

Samaksh Wani
Giga Sage
Giga Sage

Hello @Bhavani13 

 

You can create a onChange Client Script :-

 

 

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var group = g_form.getControl('assignment_group');
if(group.changed){
var newdate = new GlideDateTime();
g_form.setValue('date_field',newdate);
}
}

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh