@Community Alums 

 

Thanks for your Responding!

 

How to do it, Can you please provide steps for this. It be helpful

 

Thanks!

Mania

 

Gustav Aldenbra
Kilo Sage

Hi @mania

If I'm reading your question correct you want to be able to change assignment group and assigned to even if worked time is empty or same as before.  If you add two variable: 
var assignmentGroupChanged = current.assignment_group.changes();
var assignedToChanged = current.assigned_to.changes();

 

Then update your if statement to also check if the assignment group or assigned to did not change
&& !(assignmentGroupChanged || assignedToChanged)

 

I have not tested this myself but it should work.

@Gustav Aldenbra 

 

Thanks for your Responding!

 

I have applied code which you provided but not working. Actually I need like Before I updating the time worked field its working all fields restricted but now I want only Except assignment group or assigned to It should restrict all fields.

Can you please help on this. It will be helpful

mania_0-1708607477626.png

Thanks!

Mania

Looks like you added the Assignment group and assigned to variables inside the gs.nil move it out of that. Like this if(gs.nil(current.time_worked) || current.time_worked == previous.time_worked && !(assignmentGroupChanged || assignedToChanged))

View solution in original post

Hi @Gustav Aldenbra 

 

I have wrote BR for When time worked field is restricted like "before ticket is updating please fill the time worked field" to restricted to all the fields except assignment group and assigned to fields on Problem form.

But here I used the same code on Incident form Its working fine but in Problem form when I update the time worked field and then click on the 'Fix' button its showing again this error and When I click on 'Fix' and 'Accept Risk' button It is asking again that error so except these fields and buttond remaining all are working fine (Before updating the ticket please fill the fields).

 

Can you please suggest me why because of this is happing. It will be helpful.

 

mania_3-1710150195524.png

 

mania_4-1710150195525.png

 

mania_5-1710150195526.png