GroupingProduceGroupMainAlertHook - script include not working as expected
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi ,
I have referred the documentation :
and configured the script accordingly in a way to return the oldest alert created as main alert for tag based clustering , but still its not accepting my change as grouping logic and following tag based clustering's grouping logic that is
alert 1
alert 2
alert 3 (created on its own and alert 1 ,2 will become 3's child)
below is the script i used :
var GroupingProduceGroupMainAlertHook = Class.create();
GroupingProduceGroupMainAlertHook.prototype = {
initialize: function() {},
getMainAlert: function(groupAlertIDs) {
if (!groupAlertIDs) {
return null;
}
var gr = new GlideRecord('em_alert');
gr.addQuery('sys_id', 'IN', groupAlertIDs);
gr.orderBy('sys_created_on'); // oldest first
gr.setLimit( 1 );
gr.query();
if (gr.next()) {
return gr;
}
return null;
},
type: 'GroupingProduceGroupMainAlertHook'
};
0 REPLIES 0