I need to change assignment group for all storage events ( Incidents ) to "Server"

mominumarfi
Tera Contributor

for incidents generated through alerts we need to change assignment group to "server" 
// assignment group is specific to my requirement it can be anything 

#ITOM 

1 REPLY 1

rohansargar
Kilo Guru

Hello @mominumarfi,

 

Navigate to Event Management → Alert Rules
Open the rule used to create incidents
In the Incident Transformation section → click "Customize"
Use this script in the "Incident Customization Script" field:

// 'incident' is the incident GlideRecord being created
var group = new GlideRecord('sys_user_group');
group.addQuery('name', 'Server');  // Replace with actual group name
group.query();
if (group.next()) {
    incident.assignment_group = group.sys_id;
}

If my response helped please mark it as correct or accept as solution.

Best Regards,

Rohan