Remove Assigned to Mandatory in Incident while changing Assignment group

Vidya Pesala
Tera Contributor

I have a requirement to remove mandatory condition Assigned to while changing assignment group when the state is InProgess.

 

I have created UI Policy as per the requirement, when the state is InProgress/changing the state to InProgress from New state: Assigned to is Mandatory.

 

But my requirement is while changing the Assignment group from Inprogress state, Assigned to should not be mandatory, because we don't know which member will work from their assignment group. Also, after Assignment group changes and saves the form, Assigned to should be mandatory.

1 ACCEPTED SOLUTION

Harish Kota
Kilo Sage

Hi Vidya,

 

This requirement is tricky, but you can achieve this by using Onchange Client Script by selecting an Assignment Group Field name

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}

if (oldValue!='' && g_form.getValue("state") != '1' && oldValue!=newValue){   ///update your state backend value
g_form.setMandatory("assigned_to", false);
g_form.setValue("state", '2');  //update your state backend value
}}

View solution in original post

2 REPLIES 2

Harish Kota
Kilo Sage

Hi Vidya,

 

This requirement is tricky, but you can achieve this by using Onchange Client Script by selecting an Assignment Group Field name

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}

if (oldValue!='' && g_form.getValue("state") != '1' && oldValue!=newValue){   ///update your state backend value
g_form.setMandatory("assigned_to", false);
g_form.setValue("state", '2');  //update your state backend value
}}

Hi Harish,

 

Response is very fast, thank you! solution works for me.