Bug 41807

Summary: Fix automatic tab selection on basket groups page
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, testopia
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 41563    
Bug Blocks:    
Attachments: Bug 41807: Fix automatic tab selection on basket groups page

Description Owen Leonard 2026-02-10 13:17:10 UTC
There is some JS in basketgroups.tt which is intended to allow the script to pass a parameter for selecting the "Closed" tab on page reload but it has not been updated since the tabs WRAPPER work
Comment 1 Owen Leonard 2026-02-10 13:30:05 UTC
Created attachment 192900 [details] [review]
Bug 41807: Fix automatic tab selection on basket groups page

This patch fixes the JS in the basket groups template which is intended
to select the "Closed" tab when a "listclosed" parameter is passed.

To test, apply the patch and go to Acquisitions.

- Search for and view a vendor.
- Click "Basket groups" in the sidebar.
- Create a new basket group if necessary.
- Click "Delete" to remove the basket group.
- When the page reloads the "Closed" tab should be selected.
- Create a new basket group if necessary and click "Close and export as
  PDF." When the page reloads the "Closed" tab should be selected.
- Click "Reopen." The "Closed" tab should again be selected.

The patch doesn't make any changes to existing behavior but I think we
should re-evaluate whether the "Closed" tab is the right place to go
after deleting or reopening a basket group.

Sponsored-by: Athens County Public Libraries