Skip to content

fix: scheduled report filters dropped on save and hidden when editing (ScheduledReportDialog) - #9982

Merged
AdityaHegde merged 1 commit into
mainfrom
nishant/fix-scheduled-report-filters
Oct 2, 2026
Merged

AdityaHegde merged 1 commit into
mainfrom
nishant/fix-scheduled-report-filters

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

Steps to reproduce:

  1. In a Rill Cloud project, open a scheduled report built on an explore and choose Edit report from its menu.
  2. Under Filters, add a dimension filter and select a value, then click Save.
  3. Choose Edit report again. Expected: the filter is shown. Actual: "No filters selected".
  4. Click Run now. Expected: the delivered export is filtered. Actual: it is unfiltered.

Creating a report from an explore that has filters applied hits the same bug: the report is saved without them.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

- `ScheduledReportDialog` read the report's `where` from
  `filters.topLevelJoiner[metricsViewName]`, which is always undefined,
  so every explore report was saved without its filters.
  Read `topLevelJoiner.expr[metricsViewName]` instead, as the alert form does.
- `FiltersForm` synced its filters from the page URL, which cleared a
  report's saved filters as soon as the edit dialog opened. Skip URL sync:
  the form owns these filters.
- Add a component test that mounts the edit dialog and checks the query
  sent on save, and a reopen assertion in the reports e2e test.
],
);
updatedAggregationRequest.where = filters?.topLevelJoiner[metricsViewName];
updatedAggregationRequest.where =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird that there was no lint error throw before.

@AdityaHegde
AdityaHegde merged commit 7317a74 into main Oct 2, 2026
17 checks passed
@AdityaHegde
AdityaHegde deleted the nishant/fix-scheduled-report-filters branch October 2, 2026 02:38
AdityaHegde pushed a commit that referenced this pull request Oct 5, 2026
…#9982)

- `ScheduledReportDialog` read the report's `where` from
  `filters.topLevelJoiner[metricsViewName]`, which is always undefined,
  so every explore report was saved without its filters.
  Read `topLevelJoiner.expr[metricsViewName]` instead, as the alert form does.
- `FiltersForm` synced its filters from the page URL, which cleared a
  report's saved filters as soon as the edit dialog opened. Skip URL sync:
  the form owns these filters.
- Add a component test that mounts the edit dialog and checks the query
  sent on save, and a reopen assertion in the reports e2e test.
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.

2 participants