Notifications

890 views

Description

Embedding multiple 'report' widgets does not work when using the sp-widget directive and $sp.getWidget. The provided widget can only be used once on any Service Portal Page.

 

Steps to Reproduce

 

1. Create a widget to add multiple embedded 'report' widgets in.

2. In the Body HTML template, use the sp-widget directive like:
<sp-widget widget="data.incidentReport">

3. Pass values to reference a Report record like so in the Server script field:
var incidentReportOptions = {
"report_id": "053275cf470111002ee987e8dee490ce",
"rectangle_id": "incidentGraphReport",
"widget_parameters" : "{ \"report_id\": {\"value\": \"053275cf470111002ee987e8dee490ce\",\"displayValue\": \"Open Incidents by Assignment\"},\"show_title\": {\"value\": \"true\",\"displayValue\": \"true\"}}"
};

data.incidentReport = $sp.getWidget('report', incidentReportOptions);

3. Repeat steps 2 and 3 but for another report, for example in the Body HTML template:
<sp-widget widget="data.problemReport">

*************
Server script:
*************
var problemReportOptions = {
"report_id": "a1c6198f470111002ee987e8dee4900b",
"rectangle_id": "problemGraphReport",
"widget_parameters" : "{ \"report_id\": {\"value\": \"a1c6198f470111002ee987e8dee4900b\",\"displayValue\": \"Problems By State\"},\"show_title\": {\"value\": \"true\",\"displayValue\": \"true\"}}"
};

data.problemReport = $sp.getWidget('report', problemReportOptions);

4. Add the widget to an empty portal page.

5. View the page and notice only the last embedded widget to be called displays its report, but it displays under the header/title for the first embedded widget to be called. The header/title for the last embedded widget shows the message "Building chart, please wait...". The first report can be seen briefly when initially loading the page in its expected place underneath its title/header, but is quickly replaced with the last embedded widget to be called.

Workaround

This problem is targeted to be fixed in a future release.


Related Problem: PRB1298794

Seen In

SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - VR - Configuration Compliance - New York 2019 Q3
SR - VR - Qualys - New York 2019 Q3
SR - VR - Vulnerability Response - New York 2019 Q3
SR - VR - Vulnerability Response PA Content - Madrid 2019 Q2

Fixed In

Madrid

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-02-20 07:33:14
Published:2018-10-31