Bug 35319 - Default sorting of the holdings table with OPACHoldingsDefaultSortField is broken
Summary: Default sorting of the holdings table with OPACHoldingsDefaultSortField is br...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: regression
Depends on: 16759
Blocks:
  Show dependency treegraph
 
Reported: 2023-11-13 13:02 UTC by Katrin Fischer
Modified: 2024-07-29 09:32 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2023-11-13 13:02:20 UTC
No matter which setting is chosen, the sorting remains on the itemtype column. If the item type column is hidden via table settings, it still seems to apply. None of the other columns shows as sorted judging from the small arrow icons on top.

Confirmed in 23.05 and 22.11.
Comment 1 Jonathan Druart 2024-03-19 09:03:05 UTC
./opac-detail.tt ~ l.1806

it's creating default_order_index that is never used later
Comment 2 Michał 2024-07-22 08:42:14 UTC
The problem is that ever since this commit: https://github.com/Koha-Community/Koha/commit/92f6f5b049cc6a45917465f87efa93d51ff81a4a

...the preference OPACHoldingsDefaultSortField is dead. It sets a JavaScript variable based on it in the template, but that variable is not used anywhere anymore.

Right now no sorting is defined, meaning the holdings should actually be sorted by the itemnumber from the items table. The claim that it's sorted by itemtype column should be all but coincidental, can you confirm that?

I guess the solution is to either remove that preference to not confuse people or to re-create it in a way that any column could be specified, such as copy number, callnumber and so on, setting it as "first column" sucked anyway.
Comment 3 Katrin Fischer 2024-07-29 09:32:46 UTC
Hm, a sort by itemnumber is less than ideal as it will produce a "wild mix" that is not clear to the user at all. I am updating severity.