The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to remove Resolved incidents from Incidents assigned to you in overview of SOW home page

Satya61
Tera Contributor

Hi Guys,

 

Can anyone please help me with the below query.

 

I want to remove resolved state incidents from "Incidents assigned to you" in Overview of Service operations Workspace Home page.

Not getting the solution for the above, any suggestions on this would be appreciate.

 

Attached the screenshot for reference. (Just want to display In progress incidents not resolved ones).

 

Thanks,

Satya 

2 ACCEPTED SOLUTIONS

Clara Lemos
Mega Sage
Mega Sage

Hi @Satya61 ,

 

All you need to do is follow this steps:

  1. Navigate to sys_ux_client_script_include.list
  2. Find this script: SowIncidentLandingPageUtils
  3. Replace the code that you have on the script field with the following:

 

function include({imports}) { 
    let serviceDeskLandingPageUtilsSNC = imports['sn_sow_inc.SowIncidentLandingPageUtilsSNC']();
    class ServiceDeskLandingPageUtils extends serviceDeskLandingPageUtilsSNC {

static async getVisualizationConfig(helpers, mode) {
            const evamDef = this.getEvamDef();
            const visualizationConfig = [{
                    "id": "incident_assigned",
                    "tableName": "incident",
                    "tableDisplayValue": "Incident",
                    "myWorkQuery": "stateIN1,2,3^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                    "myTeamQuery": "stateIN1,2,3^assigned_toISNOTEMPTY^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "listView": mode == "your_work" ? "sow_landing_page_assigned" : "sow_landing_page",
                    "header": mode == 'your_work' ? await helpers.translate("Incidents assigned to you") : await helpers.translate("Incidents assigned to your team"),
                    "groupByField": "state",
                    "evamId": evamDef['incidentEvamDefinitionId'],
                    "updated_on": "^ORDERBYDESCsys_updated_on",
                },
                {
                    "id": "incident_sla",
                    "tableName": "task_sla",
                    "tableDisplayValue": "Task SLA",
                    "myWorkQuery": "task.sys_class_name=incident^task.assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe^task.active=true^sla.type=SLA^ORsla.type=OLA^active=true^time_left<=1970-01-08 00:00:00",
                    "myTeamQuery": "task.sys_class_name=incident^task.assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744^task.active=true^sla.type=SLA^ORsla.type=OLA^active=true^time_left<=1970-01-08 00:00:00",
                    "listView": 'sow_landing_page',
                    "header": await helpers.translate("Incident SLAs"),
                    "groupByField": "time_left",
                    "evamId": evamDef['incidentSlaEvamDefinitionId'],
                    "updated_on": "^ORDERBYtime_left",
                },
                {
                    "id": "unassigned_incidents",
                    "tableName": "incident",
                    "tableDisplayValue": "Incident",
                    "myWorkQuery": "active=true^assigned_toISEMPTY^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "myTeamQuery": "active=true^assigned_toISEMPTY^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "listView": mode == "your_work" ? "sow_landing_page_assigned" : "sow_landing_page",
                    "header": await helpers.translate("Unassigned incidents"),
                    "groupByField": "priority",
                    "evamId": evamDef['incidentEvamDefinitionId'],
                    "updated_on": "^ORDERBYDESCsys_updated_on",
                },
                {
                    "id": "catalog_tasks",
                    "tableName": "sc_task",
                    "tableDisplayValue": "Catalog Task",
                    "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                    "myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "listView": 'sow_landing_page',
                    "header": mode == 'your_work' ? await helpers.translate("Catalog tasks assigned to you") : await helpers.translate("Catalog tasks assigned to your team"),
                    "groupByField": "state",
                    "evamId": evamDef["catalogTaskEvamDefinitionId"],
                    "updated_on": "^ORDERBYDESCsys_updated_on",
                }
            ];
            return visualizationConfig;
        }

    }
    return ServiceDeskLandingPageUtils;
}

 

  • Click Save
  • You might need to refresh your SOW to see the results 

If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know

Cheers

View solution in original post

Dibyaratnam
Tera Sage

1) Open sys_ux_client_script table.

2) Open UX client script "UpdateDonutsConfig".

3) Search for the line "api.setState("donutConfig", donutConfig);"

4) Just above it add the given script:

for (var i = 0; i < donutConfig.length; i++) {
        if (donutConfig[i].id == 'incident_assigned') {
            donutConfig[i].datasource[0].filterQuery = donutConfig[i].datasource[0].filterQuery + '^state!=6';
            break;
        }
    }

5) Once done save it, do a hard reload on your workspace browser tab and it should remove the resolved state incidents from the donut.

 

If the UX client script is read only or protected, then you have to go to UI Builder and open the page and create a variant to make modifications otherwise it won't allow you to make changes.

 

Please mark my answer as correct if it solves your issue.

View solution in original post

3 REPLIES 3

Clara Lemos
Mega Sage
Mega Sage

Hi @Satya61 ,

 

All you need to do is follow this steps:

  1. Navigate to sys_ux_client_script_include.list
  2. Find this script: SowIncidentLandingPageUtils
  3. Replace the code that you have on the script field with the following:

 

function include({imports}) { 
    let serviceDeskLandingPageUtilsSNC = imports['sn_sow_inc.SowIncidentLandingPageUtilsSNC']();
    class ServiceDeskLandingPageUtils extends serviceDeskLandingPageUtilsSNC {

static async getVisualizationConfig(helpers, mode) {
            const evamDef = this.getEvamDef();
            const visualizationConfig = [{
                    "id": "incident_assigned",
                    "tableName": "incident",
                    "tableDisplayValue": "Incident",
                    "myWorkQuery": "stateIN1,2,3^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                    "myTeamQuery": "stateIN1,2,3^assigned_toISNOTEMPTY^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "listView": mode == "your_work" ? "sow_landing_page_assigned" : "sow_landing_page",
                    "header": mode == 'your_work' ? await helpers.translate("Incidents assigned to you") : await helpers.translate("Incidents assigned to your team"),
                    "groupByField": "state",
                    "evamId": evamDef['incidentEvamDefinitionId'],
                    "updated_on": "^ORDERBYDESCsys_updated_on",
                },
                {
                    "id": "incident_sla",
                    "tableName": "task_sla",
                    "tableDisplayValue": "Task SLA",
                    "myWorkQuery": "task.sys_class_name=incident^task.assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe^task.active=true^sla.type=SLA^ORsla.type=OLA^active=true^time_left<=1970-01-08 00:00:00",
                    "myTeamQuery": "task.sys_class_name=incident^task.assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744^task.active=true^sla.type=SLA^ORsla.type=OLA^active=true^time_left<=1970-01-08 00:00:00",
                    "listView": 'sow_landing_page',
                    "header": await helpers.translate("Incident SLAs"),
                    "groupByField": "time_left",
                    "evamId": evamDef['incidentSlaEvamDefinitionId'],
                    "updated_on": "^ORDERBYtime_left",
                },
                {
                    "id": "unassigned_incidents",
                    "tableName": "incident",
                    "tableDisplayValue": "Incident",
                    "myWorkQuery": "active=true^assigned_toISEMPTY^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "myTeamQuery": "active=true^assigned_toISEMPTY^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "listView": mode == "your_work" ? "sow_landing_page_assigned" : "sow_landing_page",
                    "header": await helpers.translate("Unassigned incidents"),
                    "groupByField": "priority",
                    "evamId": evamDef['incidentEvamDefinitionId'],
                    "updated_on": "^ORDERBYDESCsys_updated_on",
                },
                {
                    "id": "catalog_tasks",
                    "tableName": "sc_task",
                    "tableDisplayValue": "Catalog Task",
                    "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                    "myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                    "listView": 'sow_landing_page',
                    "header": mode == 'your_work' ? await helpers.translate("Catalog tasks assigned to you") : await helpers.translate("Catalog tasks assigned to your team"),
                    "groupByField": "state",
                    "evamId": evamDef["catalogTaskEvamDefinitionId"],
                    "updated_on": "^ORDERBYDESCsys_updated_on",
                }
            ];
            return visualizationConfig;
        }

    }
    return ServiceDeskLandingPageUtils;
}

 

  • Click Save
  • You might need to refresh your SOW to see the results 

If that helps please mark my answer as correct / helpful!
And if further help is needed please let me know

Cheers

It worked for me, thanks for your help.

Dibyaratnam
Tera Sage

1) Open sys_ux_client_script table.

2) Open UX client script "UpdateDonutsConfig".

3) Search for the line "api.setState("donutConfig", donutConfig);"

4) Just above it add the given script:

for (var i = 0; i < donutConfig.length; i++) {
        if (donutConfig[i].id == 'incident_assigned') {
            donutConfig[i].datasource[0].filterQuery = donutConfig[i].datasource[0].filterQuery + '^state!=6';
            break;
        }
    }

5) Once done save it, do a hard reload on your workspace browser tab and it should remove the resolved state incidents from the donut.

 

If the UX client script is read only or protected, then you have to go to UI Builder and open the page and create a variant to make modifications otherwise it won't allow you to make changes.

 

Please mark my answer as correct if it solves your issue.