Skip to content

Bug #82563 (S4b), the dashboard schedule create and update take Save to Disk, Notification and Alert - #9201

Open
Nelson-cao wants to merge 2 commits into
stylebi-wiz-main-rebasefrom
bug-82563-s4b
Open

Nelson-cao wants to merge 2 commits into
stylebi-wiz-main-rebasefrom
bug-82563-s4b

Conversation

@Nelson-cao

@Nelson-cao Nelson-cao commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Creating or updating a dashboard schedule task through the wiz routes could set only the email of a dashboard action. The Save to Disk, Notification of Task Status and Alert parts of the Schedule page's Action tab had no way in: a task that saves its dashboard to a file, tells people that it ran, or runs only under chosen highlights could not be made or changed, and what the page stored for those parts was not in the read of a task, so it could not be sent back.

Fix

Each entry of actions takes three more sections. They are built into the editor model that the Schedule tab's own save stores (the same path as email), so the save does the permission work on the real user and nothing is stored by a second path.

  • saveToDisk: files, one per format (Excel, PowerPoint, PDF, HTML, PNG, CSV from the formats the server offers). A server with server locations needs the location's label and the path inside it, and the location's own login is used, as the page requires; a server without locations takes the whole path, and an ftp:// or sftp:// path logs in with username and password (or a secretId where the server stores secrets). The page's own path checks apply. A path inside a location is relative to its folder and may not leave it: .. however the file system spells it, a leading slash or drive, : and control characters are refused; two locations with the same label are refused rather than guessed; a format is saved to one file. A file stored outside every server location (a task made before the server had locations) is read with its own login and goes back unchanged; a changed user, password or secret id is refused. The layout of the saved files and the CSV settings are set with it; a CSV file needs the tables it exports, checked against the dashboard's tables. files: [] turns Save to Disk off; an entry with only layout fields keeps the stored files.
  • notification: to, onlyIfFailed, includeLink; to: [] turns it off.
  • alert: highlights as {assembly, highlight}, each checked against the highlights the dashboard has; [] runs the action always.
  • A new action needs something to deliver: an email with recipients, a saved file or a notification.
  • A user without the Save to Disk or the Notification of Task Status option, or on a server that turned it off, is refused naming actions[i].saveToDisk or actions[i].notification for anything the action does not already have, before any location label, format or table of the request is checked. A read leaves those two sections out for such a user, as the page hides them, and an update that leaves a section out keeps the stored one. After the save, what it kept is compared with what was asked (files, logins, layout, CSV settings, notification, alert), so a change the save would drop or restore is refused naming the field instead of being stored as something else. A password is never read back; the read gives a placeholder that keeps the stored password only for the same login, and a placeholder that would be carried to another server or user is refused with that reason.
  • The saved files are set on the editor model, not on the action copied from the stored task: that copy shares its file map with the stored task.
  • A read of a task gives the three sections in the shape a write takes. The server reports the feature actions-delivery.
  • ScheduleTaskService.getServerLocations(Principal) is a public wrapper of the lookup getServerLocationLabels already uses, so the locations can be resolved by label.

Tests

WizScheduleDeliveryTest (46) covers every section, refusal and round trip behind the stand-in for the Schedule tab's save that the other wiz schedule tests use. WizScheduleDeliveryStoredTest (8) goes through the portal's own ScheduleService.getActionFromModel and getActionModel with a real server location: the location's stored password, the password kept only for the same login, a stored FTP file outside every location sent back with its password kept, several formats with the CSV tables and layout, the notification and the alert, the stored XML, and the read sent back as a write. WizScheduleDeliverySanitizerTest (4) runs the comparison against the real ScheduleTaskService.sanitizeAction for a user without the Save to Disk and the Notification of Task Status options. The shared test fixture of WizScheduleConditionsTest is extended for the new sections.

🤖 Generated with Claude Code

Nelson-cao and others added 2 commits December 2, 2026 18:34
… the Save to Disk, Notification of Task Status and Alert of an action

A dashboard action of a schedule task can now save the dashboard to files, notify people that the task ran, and run only under chosen highlights, as the Schedule page's Action tab does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…sent back with its login, a user without the option sees and learns nothing of the section

A read of a task whose Save to Disk file is outside every server location carries the file's
login (the user, the placeholder for the stored password, or the secret id), but sending it back
was refused once the server had locations. The stored file is now matched first and its own login
is accepted; a changed user, password or secret id is still refused.

A user without the Save to Disk or the Notification of Task Status option no longer sees the
stored section in a read (the Schedule page hides it), and is told they lack the option before
any location label, format or table of the request is checked. Two server locations with the same
label are refused instead of the first one being used, a path inside a location is checked
against '..' however the file system spells it, a leading slash or drive, ':' and control
characters, and a file with a login but no location is told a location is required. A
placeholder password is refused with its own reason when it would be carried to another server
or user.

Adds a test that runs the comparison against the real ScheduleTaskService.sanitizeAction.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant