Assign incident ticket based upon shift timings to respective user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Requirement
Need to assign the priority tickets to respective groups based on their shift roster available users . How we can achieve this test case please suggest ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Use BR for that,
if (current.priority <= 2) {
var grp = new GlideRecord('sys_user_group');
grp.addQuery('u_supports_priority', true); // custom flag
grp.query();
while (grp.next()) {
var usr = new GlideRecord('sys_user');
usr.addQuery('active', true);
usr.addQuery('sys_user_grmember.group', grp.sys_id);
usr.addQuery('sys_user_schedule.schedule.is_active', true);
usr.query();
if (usr.hasNext()) {
current.assignment_group = grp.sys_id;
break;
}
}
// fallback
if (!current.assignment_group)
current.assignment_group = 'BACKUP_GROUP_SYS_ID';
}
You you want screenshot I can share though..
If you find this helpful mark as helpful and accept solution..
