- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 11:48 AM - edited 11-17-2022 12:42 PM
I am trying to figure out how to auto assign assignment group for each service.
For example on the OOTB change form I select "Email", I would like to auto assign to assignment group "Help Desk"
P:s: How can I add additional option to the available selection in the assignment group field
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 10:01 AM
Hi Cynthia,
Although, I complete go with @MD AQUIB KHAN 's code, If you looking for something OOTB configuration, then you can leverage Assignment Rule module under Routing and Assignment Application which is slightly easier to use.
Below is the steps you can follow.
Go to Assignment rules module under Routing and Assignment Application
1.
2. Select the table and under conditions choose 'Service' field and choose the correct Service.
3. Now go to 'Assign to' Section and add the 'Group' which you want the routing to happen. This will make sure that when you select the 'Service' field, then the assignment group field will be auto populated.
Please mark helpful/Give a thumbs up, if this inline with your expectation.
Regards,
Gagan k
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 02:56 AM
Hi Cynthia,
Did you want to auto populate assignment group based on Service?
We can do this using Client scripts by making Glide Ajax call. I can share the scripts with you.
Also, one important point: On the Change Form, Based on CI, the assignment group gets populated as well.
It may override as well. You have to validate if there are any mapping done for assignment group based on CI.
Please let me know if you have additional thought.
Thanks,
Aquib
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 05:11 AM
Could you kindly share the script please. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 05:37 AM
Hi Cynthia ,
Prerequisite: Service(cmdb_ci_service) support group should not be empty.
if you are using change group/support group from service to populate assignment group on the Change form. It should not be empty.
I am using support group form service (cmdb_ci_service).
Output:
Please find the scripts below:
//Client Script:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var gr = new GlideAjax('CostCentre');
gr.addParam('sysparm_name', 'getchangeService');
gr.addParam('sysparm_service', newValue);
gr.getXML(mycallback);
function mycallback(response) {
var answer = response.responseXML.documentElement.getAttribute('answer');
alert(answer);
g_form.setValue('assignment_group', answer);
}
}
Script Include:
getchangeService: function() {
var grgroup;
var gruser = this.getParameter('sysparm_service');
var grci = new GlideRecord('cmdb_ci_service');
grci.addQuery('sys_id', gruser);
grci.query();
while (grci.next()) {
grgroup = grci.getDisplayValue('support_group'); // Basically I am passing the CI Support Group. Also It can be
change group or approval group
}
return grgroup;
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 10:01 AM
Hi Cynthia,
Although, I complete go with @MD AQUIB KHAN 's code, If you looking for something OOTB configuration, then you can leverage Assignment Rule module under Routing and Assignment Application which is slightly easier to use.
Below is the steps you can follow.
Go to Assignment rules module under Routing and Assignment Application
1.
2. Select the table and under conditions choose 'Service' field and choose the correct Service.
3. Now go to 'Assign to' Section and add the 'Group' which you want the routing to happen. This will make sure that when you select the 'Service' field, then the assignment group field will be auto populated.
Please mark helpful/Give a thumbs up, if this inline with your expectation.
Regards,
Gagan k