Analyzer External JavaScript API: saveReport does not call callback when suppressSuccessNotification=false

Description

The customer wants to use the Pentaho Analyzer External JavaScript API's in his custom HTML page. He is trying to use the saveReport(name, path, successCallback, errorCallback, suppressSuccessNotification) API to save the report. I have attached the custom HTML page and steps to replicate.

In Pentaho 7.0 (Expected behavior)

  • When the suppressSuccessNotification is false, an alert pop-up is displayed and the successCallback function is executed, in this case it will display the "Saved" message.

  • If suppressSuccessNotification is true, the alert Pop-up is not displayed, but the successCallback function is executed and the "Saved" message is displayed.

In Pentaho 8.3.0.25 (Actual Behavior)

  • When the suppressSuccessNotification is false, the alert pop-up is not displayed and the successCallback function is not executed, so no message is displayed.

  • When the suppressSuccessNotification is true, the alert pop-up is not displayed and the successCallback function is executed and the "Saved" message is not displayed.

The file is saved successfully on repository in both the cases.

This is the documentation reference.

https://help.hitachivantara.com/Documentation/Pentaho/8.2/Developer_Center/Analyzer_External_JavaScript_API/Operation#saveReport

The documentation states that the successCallback function will be executed  when the report has been successfully saved. But in 8.3 and later versions the suppressSuccessNotification is not executed but the file is saved successfully. 

Steps to Reproduce

In Pentaho 8.3.0.25 and 9.0

  1. Create a folder named mytest under the location: pentaho-server\tomcat\webapps\pentaho

  2. Copy the attached the index.html file in the mytest folder.

  3. Start the pentaho server.

  4. Then login into pentaho as admin, and navigate to address:
    http://localhost:8080/pentaho/mytest/index.html

  5. Click SAVE several times switching "Suppress parameter" checkbox between true and false, and you will see that in the log "SAVED!" appears only when suppress = false (see the attached screenshot analyzer9.2.png).

  6. These same steps can be used for Pentaho 7.0. 

  7. In Pentaho 7.0 you will observe an alert message pop-up and "SAVED!" text when "Suppress parameter" checkbox is unchecked (Screenshot 7.0-analyzer(1) and 7.0-analyzer(2)).

  8. When Suppress parameter is checked, no alert pop-up message and "SAVED" message is displayed. 

Workaround

None

Attachments

5

Activity

Show:
Fixed

Details

Assignee

Reporter

Labels

Edit Screen Preamble

<div class="notify info" style="margin-bottom: 10px;">
If you are a Pentaho customer, please use the <a href="http://support.pentaho.com">Customer Support portal</a> to log issues.
<p />
This system is used for logging bugs and enhancement requests only. Please use our <a href="https://community.pentaho.com">community at https://community.pentaho.com</a> if you have questions, configuration issues, or have an issue with a marketplace plugin as Pentaho does not support marketplace plugins unless written by Pentaho.
<p />
Lastly, when creating a bug, please provide as much detail as possible. To prevent unnecessary delays in reviewing your issue, please attach complete server logs, SQL/MDX logs where applicable, schemas, etc. Also, screen-shots and screen-cams are especially helpful in demonstrating the issue.
<p />
Thank-you so much,<br />
The Pentaho Team
</div>

Notice

<div class="notify info" style="margin-bottom: 10px;">
When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
</div>

Sprint Team

Story Points

Fix versions

Affects versions

Priority

Created February 24, 2022 at 10:39 AM
Updated March 2, 2023 at 11:53 PM
Resolved July 19, 2022 at 10:17 AM