- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 12:11 AM
Hi all,
Just want to start in saying that this could be me confusing myself!
From what I can gather - the best way to assign roles is to assign to groups, and then add the users to those groups.
This is fine and dandy - however we do not want to have these groups as assignment groups.
I followed the below wiki article, and assigned the group type as 'itil' and then modified the Assignment group's dictionary entry to contain type 'itil'
Configuring Group Types for Assignment Groups - ServiceNow Wiki
This works great, and as expected, until someone who is a member of more than one group.
What we have found is if you were to add an assignee in Assigned to before adding an assignment group, it will add the first group they are a member of, whether or not it is an assignment group with the 'itil' type or not.
Does anyone know how I can stop this from happening?
I hope I have explained this well enough......
Thanks in Advance!
Brendan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2016 05:32 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 01:16 AM
You'll need to check the BackfillAssignmentGroup script include. You can probably edit it to only select groups with a specific type.
There will still be an issue with selecting the first group they find in case you belong to more than one group.
Reference Qualifiers - ServiceNow Wiki
backfill assignment group AND filter by group type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2016 06:11 PM
Hi Fred,
Thanks for your reply.
There will still be an issue with selecting the first group they find in case you belong to more than one groupI am totally fine with this - as long as they are only the assignment groups that I specify with the type 'itil'
It seems that we are not using a BackfillAssignmentGroup script, only a simple reference qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2016 12:42 AM
Have you checked the Dictionary Override if you are using the BackfillAssignmentGroup script?
The simple Reference qualifier you have shouldn't automaticly add any group based on your assigned to, it should only limit it to what groups are selectable. If the assignment group is populated automaticly you have some script doing this. If not a dictionary override there might be an onChange Client Script doing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2016 04:04 PM
HI all,
I am hoping that someone can help out. Sorry for dredging up an old post, however I have found some free time to work on this.
I have found that our implementer has indeed created a client script that back fills when you add an assignee.
Table: Task
Type: OnChange
Field Name: Assigned To
Global: Yes
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var group = g_form.getValue('assignment_group');
if (group == '') {
var ga = new GlideAjax('KSTaskAjax');
ga.addParam('sysparm_name', 'getPrimaryGroupInfo');
ga.addParam('sysparm_assignedTo', newValue);
ga.getXML(setAssignmentGroup);
}
function setAssignmentGroup(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
var obj = eval('(' + answer + ')');
if (obj.groupCount == '0') {
var _msg = obj.assignedName + ' is not a member of an assignment group, select another Assigned to';
alert(_msg);
g_form.setValue('assigned_to','', '');
}
if (obj.groupID != '') {
if (obj.groupCount == 1) {
// set a global to indicate that we are setting the assignment group
// this will be checked in the onchange client script for assignment group
global_ignoreAssignmentGroupChange = true;
g_form.setValue('assignment_group', obj.groupID, obj.groupName);
}
g_form.hideFieldMsg('assignment_group');
if (obj.groupCount > 1) {
g_form.showFieldMsg('assignment_group',
obj.assignedName + ' belongs to more than one group. Please select the correct group.', 'info');
}
}
global_ignoreAssignmentGroupChange = false;
}
}
Does anyone know how I can include a filter by the group type "itil" in this script?
Cheers,
Brendan