Populate Assignment Group & Assigned To based on the logged in user and their Primary Group

RichardSaunders
Tera Guru

I need to be able to populate the Populate Assignment Group & Assigned To for service desk staff only. This should not happen to users using the self service portal.

I have experimented with default value: javascript:gs.getUserID() and assignment rules but can not get it working.

any advise/pointers?

1 ACCEPTED SOLUTION

Is this what you are looking for with an onLoad client script?



function onLoad() {


//Type appropriate comment here, and begin script below


var grp = g_form.getValue('assignment_group');


if (grp == ''){


var userName = g_user.userName;//logged in user



var gr = new GlideRecord("sys_user");//check if the logged in user has a primary group


gr.addQuery('user_name', userName);


gr.addQuery('u_primary_group', '!=', '');


gr.query();


if (gr.next()){//logged in user is a member of assignment group


g_form.setValue('assignment_group', gr.u_primary_group);


g_form.setValue('assigned_to', g_user.userID);


}


}


}


View solution in original post

20 REPLIES 20

True, even if it saves them a few clicks it will allow them to spend more time on the incident itself.



That's a good point, i hadn't factored other contact types, Phone is still quite high though



find_real_file.png


That's a good point, i hadn't factored other contact types, Phone is still quite high though


True - it represents the majority usage, so tackling productivity improvements for that particular Contact Type is the right target.



Anyone investigated why self-service is much lower than phone?   I'm just presuming all end-users have ESS ability but chose to ring up instead - it's perfectly possible no ESS portal is available (or these aren't authenticated users) but if so, the figures feel like a swamped service desk.


Apologies for the delayed response. I've been off on my holidays for two weeks!



We do try and promote the self-service portal for non-critical issues, and they do all have access to ess portal. I can't speak for the ITSM manager on why that figure is much lower for self-service, but i do think people are a bit old fashioned and like to pick up a phone (or headset!). Also... those figures are reflective of 20k employees.


I know you logged this response many moons ago, but our firm does the same.  Our Service Desk is a triage for any requests which do not a specific request form.  Our Self-Service has not released yet, but we tried this option before with another tool and self-service was very much not used.  With ServiceNow, we have our Service Desk members fill out the Service Desk Request (Only visible to ITIL users) form, it will assign to them as the person who logged in under the assignment group of Service Desk.  If an ITIL user who is not a member of the Service Desk logs the ticket via the form, the Request is still assigned to the Service Desk, where someone is watching a queue and assigning out.  We are really hoping the new self-service portal will be used, but no guarantees in a firm like ours.

ndt13
Giga Expert

When do you want this to happen?   Only when the Service Desk uses the "Create New" button?