Bug 39955 - Report subgroup filter not cleared when changing tabs
Summary: Report subgroup filter not cleared when changing tabs
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks: 39534
  Show dependency treegraph
 
Reported: 2025-05-21 14:38 UTC by Owen Leonard
Modified: 2025-06-19 09:02 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.11.00,25.05.01,24.11.06
Circulation function:


Attachments
Bug 39955: Report subgroup filter not cleared when changing tabs (1.79 KB, patch)
2025-05-21 15:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 39955: Report subgroup filter not cleared when changing tabs (1.94 KB, patch)
2025-05-22 06:20 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 39955: Report subgroup filter not cleared when changing tabs (2.01 KB, patch)
2025-05-29 18:51 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2025-05-21 14:38:06 UTC
There is an error in the way saved SQL report subgroups behave when you change tabs: The subgroup filter gets applied to the new tab too. Since subgroup codes are unique, this means the all the reports under the tab you switched to are filtered out.
Comment 1 Owen Leonard 2025-05-21 15:16:15 UTC
Created attachment 182695 [details] [review]
Bug 39955: Report subgroup filter not cleared when changing tabs

This patch fixes the JS on the saved SQL reports page so that the
subgroup column filter is correctly cleared when the tab changes. The
wrong table column is targeted.

To test, apply the patch and go to Reports -> Saved SQL reports.

- If necessary, at least two SQL reports, each with in a different group
  and different subgroup. For example:
  - sql: SELECT * FROM items LIMIT 10;
  - group: Catalog
  - subgroup: Statistics
  ...and...
  - sql: SELECT * FROM borrowers LIMIT 10;
  - group: Patrons
  - subgroup: Statistics
- From the saved reports page, go to the tab for one of your reports and
  filter by subgroup.
- Switch to a different tab containing SQL reports. The reports should
  be shown as expected.

Sponsored-by: Athens County Public Libraries
Comment 2 PTFS Europe Sandboxes 2025-05-22 06:20:38 UTC
Created attachment 182715 [details] [review]
Bug 39955: Report subgroup filter not cleared when changing tabs

This patch fixes the JS on the saved SQL reports page so that the
subgroup column filter is correctly cleared when the tab changes. The
wrong table column is targeted.

To test, apply the patch and go to Reports -> Saved SQL reports.

- If necessary, at least two SQL reports, each with in a different group
  and different subgroup. For example:
  - sql: SELECT * FROM items LIMIT 10;
  - group: Catalog
  - subgroup: Statistics
  ...and...
  - sql: SELECT * FROM borrowers LIMIT 10;
  - group: Patrons
  - subgroup: Statistics
- From the saved reports page, go to the tab for one of your reports and
  filter by subgroup.
- Switch to a different tab containing SQL reports. The reports should
  be shown as expected.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 3 Emily Lamancusa (emlam) 2025-05-29 18:51:11 UTC
Created attachment 182850 [details] [review]
Bug 39955: Report subgroup filter not cleared when changing tabs

This patch fixes the JS on the saved SQL reports page so that the
subgroup column filter is correctly cleared when the tab changes. The
wrong table column is targeted.

To test, apply the patch and go to Reports -> Saved SQL reports.

- If necessary, at least two SQL reports, each with in a different group
  and different subgroup. For example:
  - sql: SELECT * FROM items LIMIT 10;
  - group: Catalog
  - subgroup: Statistics
  ...and...
  - sql: SELECT * FROM borrowers LIMIT 10;
  - group: Patrons
  - subgroup: Statistics
- From the saved reports page, go to the tab for one of your reports and
  filter by subgroup.
- Switch to a different tab containing SQL reports. The reports should
  be shown as expected.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Lucas Gass (lukeg) 2025-06-02 21:27:49 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 5 Fridolin Somers 2025-06-19 07:41:56 UTC
I see in 25.05.x
Comment 6 Fridolin Somers 2025-06-19 07:42:25 UTC
Pushed to 24.11.x for 24.11.06
Comment 7 Paul Derscheid 2025-06-19 09:02:01 UTC
Nice work everyone!

Pushed to 25.05.x for 25.05.03