- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2023 07:57 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2023 01:20 AM
Hi @Satya61 ,
All you need to do is follow this steps:
- Navigate to sys_ux_client_script_include.list
- Find this script: SowIncidentLandingPageUtils
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2023 10:21 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2023 01:20 AM
Hi @Satya61 ,
All you need to do is follow this steps:
- Navigate to sys_ux_client_script_include.list
- Find this script: SowIncidentLandingPageUtils
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 12:42 AM
It worked for me, thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-16-2023 10:21 AM
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.