The CreatorCon Call for Content is officially open! Get started here.

'Assign To Me' button in Incident and catalog task and population of assignment group

Amith3
Kilo Contributor

Hello All,

I have a requirement to add 'Assign To Me' button/UI Action in Incident and catalog task. But the button should be available to all, regardless of where the ticket is assigned. For example – I get an email \ call \ Skype asking to look at a ticket assigned to SAP team. I then read the details and I can fix it. So I click “Assign to me” button and pick up the call.

In short, whatever the group the ticket is assigned to, if i click on 'Assign To Me', it should get assigned to My Assignment Group and then to me.

Our system is set like an Incident is assigned to one Group automatically based on the 'IT Service/Business Service' user selection in the ticket and then the support person who is a part of that group can assign to his/her name. 

So how to implement the 'Assign To Me' button here? My view is if I click on the 'Assign To Me' button, the ticket should assign to me , if i am part of the group in which the ticket is Assigned. Else if i am not part of that group, a message should come 'You are not part of the group, Please select the correct assignment group' clearing and making the 'Assignment Group' selection field as mandatory (and also it should list the groups which i am part of).

Is that possible? If yes, could you please help with the details/code?

find_real_file.png

17 REPLIES 17

Hi Amith,

Is there any update on this? Is this question resolved or you need some more assistance.

Please consider marking appropriate reply as Correct & 👍Helpful.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

Thanks for the follow up.

You have mentioned to hide the "Assign to me" button if they are not member of the current assignment group. But this is not a solution for our requirement and the client requires the button should be available to all, regardless of where the ticket is assigned.

And I still didn't get any clue on how to achieve it. One suggestion came is to setting a user a Default assignment group or Primary assignment group, if user is part of more than one assignment group, but it then will be a global change for all the users as our's is not domain separated and handling different clients using single domain.

Hi Amith,

I got your point that client wants the button to be shown always and based on membership show message.

you can inform client about the best practices and user experiences; It doesn't make sense showing that button to user if he/she is not member and allow them to click and then show the message to user

This is not a good user experience; user needs to click the button to determine whether it can be assigned to himself/herself

This would lead to these steps:

1) user logins

2) user visits record

3) user sees the button

4) user clicks the button

5) user sees message if not member

If you hide the button at first place then only first 2 steps user need to perform

I hope it helps

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

The proposed solution is to change to develop a function as follows;
If you only belong to one assignment group, the button would auto assign to you .. however if you are in multiple groups then when you click on the button, it provides you with a list of your assign groups. Then, once you select the group it will auto assign to you.

The best practices and all I informed, but they badly need this.

 

Regards,

Amith.

Hi Amith,

then in that case please check below approach

1) UI action condition visibility: if user is member of one of those groups

Script: if user belong to only 1 group then set assignment_group with that value

var groups = getMyGroups();
var arr = groups.toString().split(',');
if(arr.length == 1){

current.assignment_group = arr[0];

}

2) for multiple groups; you would require UI page to be called which would show groups to which users belongs; user selects one from the option and once submits record is saved

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader