- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 02:47 AM
‘Assign to Me’ button shows up on all New tickets right now. Clicking on it simply assigns the Incident to the current user irrespective of the Assignment group selected on the ticket
We should either -
i. Not show this button if the current user is not a part of the ticket’s assignment group.
ii. Give an error message letting the user know that the ticket cannot be assigned to them as they’re not a part of the group.
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 03:17 AM
Hello,
In the UI action "Assign to me", just add the below condition then ti will only show if the user is a part of the group:-
gs.getUser().isMemberOf(current.assignment_group.toString())
Please mark answer correct/helpful based on Impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 04:27 AM
When I use the above script I do not get any alert message in agent workspace can you please help me how to get an alert message in the agent workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 10:14 AM
if (gs.getUser().isMemberOf(current.assignment_group.toString()))
In the first line you have to add .toString() so that script will work
if (gs.getUser().isMemberOf(current.assignment_group.toString())) {
current.assigned_to = gs.getUserID();
current.update();
} else {
gs.addErrorMessage('The Ticket cannot be assigned to you as you are not the part of the selected Assignment Group');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2022 04:56 AM
In here which one I need to select