Bug 30633 - Move OPACHoldingsDefaultSortField to table settings configuration
Summary: Move OPACHoldingsDefaultSortField to table settings configuration
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
: 35319 (view as bug list)
Depends on: 40982 41010 16552 16759 29648
Blocks: 30634
  Show dependency treegraph
 
Reported: 2022-04-27 16:44 UTC by Katrin Fischer
Modified: 2025-10-14 15:12 UTC (History)
6 users (show)

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


Attachments
Bug 30633: Prepare the ground (11.51 KB, patch)
2025-10-14 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30633: Hide columns when needed (8.75 KB, patch)
2025-10-14 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30633: Add default_sort_order to table settings (812 bytes, patch)
2025-10-14 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30633: Remove OPACHoldingsDefaultSortField (5.09 KB, patch)
2025-10-14 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30633: Prepare the ground (11.56 KB, patch)
2025-10-14 14:24 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 30633: Hide columns when needed (8.79 KB, patch)
2025-10-14 14:24 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 30633: Add default_sort_order to table settings (861 bytes, patch)
2025-10-14 14:24 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 30633: Remove OPACHoldingsDefaultSortField (5.14 KB, patch)
2025-10-14 14:24 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2022-04-27 16:44:53 UTC
Now that the sorting of a table can be defined in administration > table settings, we should move OPACHoldingsDefaultSortField there and remove the pref.
Comment 1 Catrina Berka 2023-02-16 19:03:08 UTC
Does 23.05 include the ability to sort the holdingst table? There is no sort capability on that table in 22.11 so the system preference is still needed.
Comment 2 Aude Charillon 2025-09-25 15:20:07 UTC
I believe making this happen would solve bug 35319 - Default sorting of the holdings table with OPACHoldingsDefaultSortField is broken?
Comment 3 Jonathan Druart 2025-10-14 09:28:25 UTC
Feature introduced by bug 16552, accidentally removed by bug 16759.
Comment 4 Jonathan Druart 2025-10-14 09:28:48 UTC
I can work on this if we get one tester and one QAer in advance for quick inclusion.
Comment 5 Jonathan Druart 2025-10-14 09:29:36 UTC
*** Bug 35319 has been marked as a duplicate of this bug. ***
Comment 6 Ray Delahunty 2025-10-14 09:50:04 UTC
We don't have server access but assuming this is testable in a sandbox, I'll try for the first signoff.
Comment 7 Jonathan Druart 2025-10-14 10:01:18 UTC
Created attachment 187856 [details] [review]
Bug 30633: Prepare the ground

Make the OPAC holdings table ready to use visibility based on
column's names.
Comment 8 Jonathan Druart 2025-10-14 10:01:20 UTC
Created attachment 187857 [details] [review]
Bug 30633: Hide columns when needed

We can use the force_visibility flag to hide column when they are empty
or should not be displayed because of syspref.
Comment 9 Jonathan Druart 2025-10-14 10:01:22 UTC
Created attachment 187858 [details] [review]
Bug 30633: Add default_sort_order to table settings

So we can pick a column from the table settings
http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst
Comment 10 Jonathan Druart 2025-10-14 10:01:25 UTC
Created attachment 187859 [details] [review]
Bug 30633: Remove OPACHoldingsDefaultSortField

It's no longer needed
Comment 11 Jonathan Druart 2025-10-14 10:01:40 UTC
I am suggesting to remove OPACHoldingsDefaultSortField and have the default sort order option available for this table in the table settings.

With OpacLocationBranchToDisplay (introduced by bug 35006) it might improve the situation and answer the different needs.
Comment 12 Biblibre Sandboxes 2025-10-14 14:24:31 UTC
Created attachment 187886 [details] [review]
Bug 30633: Prepare the ground

Make the OPAC holdings table ready to use visibility based on
column's names.

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Comment 13 Biblibre Sandboxes 2025-10-14 14:24:33 UTC
Created attachment 187887 [details] [review]
Bug 30633: Hide columns when needed

We can use the force_visibility flag to hide column when they are empty
or should not be displayed because of syspref.

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Comment 14 Biblibre Sandboxes 2025-10-14 14:24:35 UTC
Created attachment 187888 [details] [review]
Bug 30633: Add default_sort_order to table settings

So we can pick a column from the table settings
http://localhost:8081/cgi-bin/koha/admin/columns_settings.pl#biblio-detail%7Choldingst

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Comment 15 Biblibre Sandboxes 2025-10-14 14:24:38 UTC
Created attachment 187889 [details] [review]
Bug 30633: Remove OPACHoldingsDefaultSortField

It's no longer needed

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Comment 16 Michaela Sieber 2025-10-14 14:35:42 UTC
Tested in Sandbox and additionally with ktd.

Testplan:

- search for a biblio with multiple items, e.g. biblionumber=211
- change the items so that they have different home libraries, current libraries, itemtypes, collections, and so on ...
- try different variations of sysprefs OPACHoldingsDefaultSortField and check that the sort order in the opac is always by item type
- apply patch
- Go to system preferences and verify that OPACHoldingsDefaultSortField does not exist any more
- Go to table settings and check the new drop down for default sort order
- try different variations of the default sort order settings and verify that the holdings table in the opac is sorted correctly