Create PA widget showing grouped-together incident assignment groups

kim-lindgren
Kilo Sage

Hi all,

 

I have a requirement to show resolved incidents by assignment group, where all assignment groups will be grouped into three staples.

 

First staple: Group 1, Group 2

Second staple: Group 3, Group 4, Group 5, Group 6

Third staple: All other groups

 

Between indicators, indicator sources, breakdowns, breakdown sources and PA scripts, I have not found a way to do this. I have seen tutorials for how do it with bucket groups, but that doesn't work in this case because I am working with group names, not with ranges.

 

What I have so far is

- an indicator that uses an indicator source which filters the incident table on State = Resolved

- a script on the Incident table that divides assignment groups into three categories based on their name:

 

var assignmentGroups = function(group) {
    if (group == 'Group 1' || group == 'Group 2') {
        return 'Category 1';
    } else if (group == 'Group 3' || group == 'Group 4' || group == 'Group 5' || group == 'Group 6') {
        return 'Category 2';
    }
    else {
        return 'Category 3';
    }
};

assignmentGroups(current.assignment_group);

 

How do I proceed from here?

 

Best regards,

Kim

0 REPLIES 0