How to remove the incident SLAs component from Overview section in Service Operation workspace

ilam334
Tera Expert

Hi Developers,

 

version: San deigo

we have urgent requirement to customize the Service operation workspace (remove the incident SLAs component from Overview section) and I have followed the steps like copying the overview variant and trying to remove the component, but I don't see components to remove instead got "Repeater" under carousel.

Please help in achieving it

 

ILAMLAKSHMINA_0-1671535462744.png

 

Thanks in advance!!

Regards,

Nagaraju ilam

 

#Service Operation Workspace

#IT Service Management

10 REPLIES 10

Community Alums
Not applicable

Hi @ilam334 ,

Customize the data displayed in the first-level cards in the Overview section.

Before you begin

Role required: admin

About this task

You can customize header label, data source, metric, group by field, and viewAllQuery for all cards, for example, Catalog tasks assigned to me card.

Procedure

  1. Navigate to sys_ux_client_script_include.list.
  2. Perform the following steps for the tier-1 landing page.
    1. From the UX Client Script Includes list, select SowIncidentLandingPageUtils client script include definition.
    2. On the UX Client Script Include form, edit the Script field.
      For example:
      static async getVisualizationConfig(helpers, mode) {
                  const evamDef = this.getEvamDef();
                  const visualizationConfig = [{
                          "id": "incident_assigned",
                          "tableName": "incident",
                          "tableDisplayValue": "Incident",
                          "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                          "myTeamQuery": "active=true^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;
              }
    3. Click Update.
  3. Perform the following steps for the tier-2 landing page.
    1. From the UX Client Script Includes list, select SOWLandingPageTier2Utils client script include definition.
    2. On the UX Client Script Include form, edit the Script field.
      For example:
      static async getVisualizationConfig(helpers, mode) {
                  const visualizationConfig = [{
                      "id": "incidentAssigned",
                      "tableName": "incident",
                      "tableDisplayValue": "Incident",
                      "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                      "myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                      "header": mode == 'your_work' ? await helpers.translate("Incidents assigned to you") : await helpers.translate("Incidents assigned to your team"),
                      "groupByField": "state",
                      "evamId": "01a404e8b7203010e69dbc16de11a93f",
                      "updated_on": "^ORDERBYDESCsys_updated_on",
                  },
                  {
                      "id": "problemsAssigned",
                      "tableName": "problem",
                      "tableDisplayValue": "Problem",
                      "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                      "myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                      "header": mode == 'your_work' ? await helpers.translate("Problems assigned to you") : await helpers.translate("Problems assigned to your team"),
                      "groupByField": "state",
                      "evamId": "5f0697b8f49bc510f8773ad5bd0ae292",
                      "updated_on": "^ORDERBYDESCsys_updated_on",
                  },
                  {
                      "id": "changesAssigned",
                      "tableName": "change_request",
                      "tableDisplayValue": "Change Request",
                      "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe",
                      "myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744",
                      "header": mode == 'your_work' ? await helpers.translate("Changes assigned to you") : await helpers.translate("Changes assigned to your team"),
                      "groupByField": "state",
                      "evamId": "e1f06c4194130110f87765e94545da91",
                      "updated_on": "^ORDERBYDESCsys_updated_on",
                  },
                  {
                      "id": "taskAssigned",
                      "tableName": "task",
                      "tableDisplayValue": "Task",
                      "myWorkQuery": "active=true^assigned_toDYNAMIC90d1921e5f510100a9ad2572f2b477fe^sys_class_name=incident_task^ORsys_class_name=problem_task^ORsys_class_name=change_task^ORsys_class_name=sc_task",
                      "myTeamQuery": "active=true^assignment_groupDYNAMICd6435e965f510100a9ad2572f2b47744^sys_class_name=incident_task^ORsys_class_name=problem_task^ORsys_class_name=change_task^ORsys_class_name=sc_task",
                      "header": mode == 'your_work' ? await helpers.translate("Tasks assigned to you") : await helpers.translate("Tasks assigned to your team"),
                      "groupByField": "sys_class_name",
                      "evamId": "615d205d94df0110f87765e94545da03",
                      "updated_on": "^ORDERBYDESCsys_updated_on",
                  }];
                  return visualizationConfig;
              }
    3. Click Update.

Hi @Community Alums ,

 

The script mentioned is not editable and have read-only policy on it from ServiceNow.

 

Thankyou!
Nagaraju ilam

Community Alums
Not applicable

Hi @Community Alums ,

 

Thanks for quick reply but the hiding the component can be done if it is an individual component. Here the component is Repeater, where the data will visualize in loop in carousel, we need to restrict the Incident SLAs data that is coming in from the list.

 

Thank you!

Nagaraju ilam