Bug 39534

Summary: Saved report subgroup filter not hidden correctly
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ReportsAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Lisette Scheer <lisette>
Severity: minor    
Priority: P5 - low CC: anneli.osterman, lisette, lucas
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
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
Circulation function:
Bug Depends on: 39955    
Bug Blocks:    
Attachments: Bug 39534: Hide reports subgroup filter if there are no subgroups
Bug 39534: Hide reports subgroup filter if there are no subgroups
Bug 39534: Hide reports subgroup filter if there are no subgroups

Description Owen Leonard 2025-04-02 16:45:49 UTC
When viewing a tab on the saved reports page, a "subgroups" dropdown appears whether or not there are any subgroups for that group. The dropdown should be hidden if there are no subgroups.
Comment 1 Owen Leonard 2025-05-21 17:01:46 UTC
Bug 39534: Saved report subgroup filter not hidden correctly
Comment 2 Owen Leonard 2025-05-21 17:08:57 UTC Comment hidden (obsolete)
Comment 3 PTFS Europe Sandboxes 2025-05-22 09:54:38 UTC
Created attachment 182723 [details] [review]
Bug 39534: Hide reports subgroup filter if there are no subgroups

This patch updates the JavaScript which runs on the list of saved SQL
reports, adding a check for report subgroups to the display of the
report subgroups dropdown. The patch also hides the subgroups dropdown
if there is no saved tab, in which case the tabsInit function doesn't
run.

To test you should have multiple reports organized in multiple groups
and subgroups. See the test plan on Bug 39534.

- Go to Reports -> Saved SQL reports.
- If the page loads with the "All" tab active, there should be no
  subgroups dropdown.
- If the page loads under a different tab, the subgroups dropdown should
  only show if that group has subgroups.
- Switch between the various report group tabs to confirm that the
  subgroups dropdown is shown or hidden correctly based on the existence
  of subgroups.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Comment 4 Lisette Scheer 2025-06-27 17:34:44 UTC
Created attachment 183624 [details] [review]
Bug 39534: Hide reports subgroup filter if there are no subgroups

This patch updates the JavaScript which runs on the list of saved SQL
reports, adding a check for report subgroups to the display of the
report subgroups dropdown. The patch also hides the subgroups dropdown
if there is no saved tab, in which case the tabsInit function doesn't
run.

To test you should have multiple reports organized in multiple groups
and subgroups. See the test plan on Bug 39534.

- Go to Reports -> Saved SQL reports.
- If the page loads with the "All" tab active, there should be no
  subgroups dropdown.
- If the page loads under a different tab, the subgroups dropdown should
  only show if that group has subgroups.
- Switch between the various report group tabs to confirm that the
  subgroups dropdown is shown or hidden correctly based on the existence
  of subgroups.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Comment 5 Lucas Gass (lukeg) 2025-06-30 14:32:17 UTC
Nice work everyone!

Pushed to main for 25.11