- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 12:07 AM - edited 02-22-2024 12:08 AM
Hi,
I have restricted all the fields when before time worked field is updated It is showing like "Please fill the time worked before updating the ticket" But here I am facing one issue like I dont want to restrict Assignment group and assigned to so I want only restricting remaining fields(Except Assignment group and assigned to fields).
I wrote one BR for restrict all fields and attached below screen sorts.
How to do that can anyone help me on this, It will be helpful.
Thanks in Advance!
Solved! Go to Solution.
- 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
02-22-2024 04:08 AM
Hi @mania ,
Instead of creating BR,,, try to achieve this by using UI Policy. You can make all required fields as read only when time worked is not filled.
- 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
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