Bug 38080

Summary: Sorting options for holdings table are incorrect
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, michaela.sieber
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30633
GIT URL: Initiative type: ---
Sponsorship status: --- Crowdfunding goal: 0
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 14919    
Bug Blocks:    
Attachments: Bug 38080: Fix order of columns in opac's holdings tables

Description Nick Clemens (kidclamp) 2024-10-03 17:25:42 UTC
The sorting seems to rely on the correct ordering of the columns from the DB/YAML - the current order does not match the displayed order, so if you select to sort by CCODE, we actually sort by callnumber
Comment 2 Jonathan Druart 2025-10-20 08:20:41 UTC
I do recreate the problem at the OPAC
Comment 3 Jonathan Druart 2025-10-20 08:23:03 UTC
Caused by 
  commit 4fa34acc414a1580019df62c28bb39bb6d9f3e85
  Bug 14919: Add holds history for patron
Comment 4 Jonathan Druart 2025-10-20 08:25:14 UTC
Created attachment 188142 [details] [review]
Bug 38080: Fix order of columns in opac's holdings tables

The order of the columns in the yaml file must match the order of the
columns in the template file.

Test plan:
Confirm that, with bug 30633 applied, you can pick "shelving location"
as the default sort order and that the items are correctly sorted by
shelving location.
Comment 5 Jonathan Druart 2025-10-20 08:25:53 UTC
This bug has certainly been opened for the staff. In the OPAC the problem shouldn't be visible before bug 30633.