- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 05:18 AM - edited 02-22-2024 05:18 AM
@Community Alums
Thanks for your Responding!
How to do it, Can you please provide steps for this. It be helpful
Thanks!
Mania
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 04:10 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 05:15 AM - edited 02-22-2024 05:15 AM
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
Thanks!
Mania
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 05:29 AM
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))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2024 02:46 AM - edited 03-11-2024 02:47 AM
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.