How to get an Assignment Group depending on CI

Niels Toulorge
Tera Contributor

Hi everyone, (and sorry for my poor english, 'll try to be clear).

All our tickets are assigned to the same default group.

I would like to know, when we sometimes have to change "Assignment group", if it's possible to auto-populate it with a button depending on the "Service" or "CI" field ?

Like "Add_me" button, is it possible to use macro and ref_contributions to find the field value or maybe the support group defined on the CI ?

 

 

1 ACCEPTED SOLUTION

Anne Mc
Kilo Expert

The automatic assignment on change of CI will only be workable if you always want incidents to go to the escalation group. That wasn't what we wanted because for most CIs our Service Desk do the triaging and first line support. It is only escalated to the technical team if the Service Desk cannot resolve it.  So we provide a 'Re-Assign' button that changes the assignment group to the escalation team.

For this to work, all CIs need a team to be associated with them.  If you are using the CI assignment group, then UI Action would look like this:

if(!current.cmdb_ci.assignment_group.nil()){
 current.assignment_group = current.cmdb_ci.assignment_group;
 current.assigned_to = '';
 current.update();
}
else{
 gs.addInfoMessage("Please make sure you choose a Valid Configuration Item before escalating");
}
current.doRedirect = true;
action.setRedirectURL(current);

It first checks if there is an assignment group for the CI, and if not displays a warning.  If there is one set, it changes the assignment group. It also clears the assigned_to field. It then reloads the form.
 
You may also want to change the state - we change it to a custom state (Consultant Required) so escalation teams can easily see which incidents need attention in their guages.
 
In the condition field we restrict the visibility of the button to users with the itil role and prevent it being visible if the incident is resolved or closed:
 
gs.hasRole("itil") && current.incident_state != 6 && current.incident_state != 7
 
Regards,
Anne.

 

 

View solution in original post

9 REPLIES 9

Anne Mc
Kilo Expert

As Sachin says, you would need to map an escalation group for each CI you wanted to be able to escalate. You could either add that field at the CI level or what we have done is created categories for each CI and set an escalation group for each category. We then have a UI Action which provides a 'Re-Assign' button on the Incident form.  When clicked the script checks that the current category is not null, sets the assignment group to be the escalation group for that category and nulls the 'assigned to' field.

Niels Toulorge
Tera Contributor

Hi all,

 

annemc, it seems to be the way i'm looking for.

For exemple, with "Contrat TT" CI selected in incident form, UI action could be defined to set reference field "support group" of this CI into "Assignment group" ? that's right ?

find_real_file.png

Sorry for my newbie question, i'm new on Snow and totally novice with script..

 

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

 

For this we usually use Assignment lookup rules to assign Assignment group depending upon CI selected.

 

Steps:

1) Create a lookup rules in assignment lookup rules.

2) Onchange script on CI which will call assignment rule and then set the Assignment group.

3) Script include which is called from assignment lookup rule which will handle your conditions.


Thanks,

Ashutosh Munot

 

Please Hit Correct, Helpful or like,if you are satisfied with this response.

Anne Mc
Kilo Expert

The automatic assignment on change of CI will only be workable if you always want incidents to go to the escalation group. That wasn't what we wanted because for most CIs our Service Desk do the triaging and first line support. It is only escalated to the technical team if the Service Desk cannot resolve it.  So we provide a 'Re-Assign' button that changes the assignment group to the escalation team.

For this to work, all CIs need a team to be associated with them.  If you are using the CI assignment group, then UI Action would look like this:

if(!current.cmdb_ci.assignment_group.nil()){
 current.assignment_group = current.cmdb_ci.assignment_group;
 current.assigned_to = '';
 current.update();
}
else{
 gs.addInfoMessage("Please make sure you choose a Valid Configuration Item before escalating");
}
current.doRedirect = true;
action.setRedirectURL(current);

It first checks if there is an assignment group for the CI, and if not displays a warning.  If there is one set, it changes the assignment group. It also clears the assigned_to field. It then reloads the form.
 
You may also want to change the state - we change it to a custom state (Consultant Required) so escalation teams can easily see which incidents need attention in their guages.
 
In the condition field we restrict the visibility of the button to users with the itil role and prevent it being visible if the incident is resolved or closed:
 
gs.hasRole("itil") && current.incident_state != 6 && current.incident_state != 7
 
Regards,
Anne.

 

 

Niels Toulorge
Tera Contributor

Hi,

 

Thank you annemc. It looks good !

Just for information, is it possible to put in just on the right of "Assignement group" button  (like "add_me" button, cf example below) ? 

find_real_file.png

 I tried with macro and ref_contributions, but it doesn't work ... Button doesn't appear (It seems that something prevent button to appear)

I don't know why, but ui macro seems to not work on assignment_group field, even in dev instance.

Anyway, thank you annemc for the trick o/