Bug 35006 - OPAC holdings table - sort for current library column doesn't work
Summary: OPAC holdings table - sort for current library column doesn't work
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 29144 31313
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-08 18:30 UTC by David Nind
Modified: 2023-11-13 14:19 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the holdings table on the OPAC's bibliographic detail page so that home and current library columns are sorted correctly by library name.
Version(s) released in:
23.11.00,23.05.05,22.11.12


Attachments
Bug 35006: OPAC holdings table - Fix sort for library columns (4.27 KB, patch)
2023-10-10 13:37 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35006: OPAC holdings table - Fix sort for library columns (4.32 KB, patch)
2023-10-10 18:38 UTC, David Nind
Details | Diff | Splinter Review
Bug 35006: OPAC holdings table - Fix sort for library columns (4.37 KB, patch)
2023-10-11 18:07 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2023-10-08 18:30:57 UTC
In the OPAC, the sort by 'Current library' in the holdings table for a record doesn't work.

Sorting of other columns seem to work okay (change one of the item types for an item, collection code, and add different call numbers to test).

To replicate:
1. Go to a record in the OPAC that has multiple items in different libraries (126 - Intermediate Perl has four items in three different libraries).
2. In the holdings tab, click the 'Current library' column.
3. Note that the sort order doesn't change.
Comment 1 Katrin Fischer 2023-10-09 20:44:49 UTC
Confirmed the bug, but not sure what the problem is :(
Comment 2 Owen Leonard 2023-10-10 13:37:55 UTC
Created attachment 156797 [details] [review]
Bug 35006: OPAC holdings table - Fix sort for library columns

This patch updates the holdings table on the OPAC's bibliographic detail
page so that home and current library columns can be sorted correctly by
library name. There have been changes to the way the template shows
these values, but the DataTables "data-sort" attribute on the table cell
had not been updated accordingly.

To test, apply the patch set the OpacLocationBranchToDisplay system
preference to "home and holding libraries."

- Make sure home and holding library columns are not hidden in the
  table settings under Administration -> Table settings -> OPAC ->
  holdingst.
- Locate a bibliographic record in the OPAC which has multiple items
  from different libraries.
- Test that the home and current library columns sort correctly by
  library name.
Comment 3 David Nind 2023-10-10 18:38:32 UTC
Created attachment 156804 [details] [review]
Bug 35006: OPAC holdings table - Fix sort for library columns

This patch updates the holdings table on the OPAC's bibliographic detail
page so that home and current library columns can be sorted correctly by
library name. There have been changes to the way the template shows
these values, but the DataTables "data-sort" attribute on the table cell
had not been updated accordingly.

To test, apply the patch set the OpacLocationBranchToDisplay system
preference to "home and holding libraries."

- Make sure home and holding library columns are not hidden in the
  table settings under Administration -> Table settings -> OPAC ->
  holdingst.
- Locate a bibliographic record in the OPAC which has multiple items
  from different libraries.
- Test that the home and current library columns sort correctly by
  library name.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-10-10 18:38:51 UTC
Thanks Owen!
Comment 5 Nick Clemens 2023-10-11 18:07:44 UTC
Created attachment 156873 [details] [review]
Bug 35006: OPAC holdings table - Fix sort for library columns

This patch updates the holdings table on the OPAC's bibliographic detail
page so that home and current library columns can be sorted correctly by
library name. There have been changes to the way the template shows
these values, but the DataTables "data-sort" attribute on the table cell
had not been updated accordingly.

To test, apply the patch set the OpacLocationBranchToDisplay system
preference to "home and holding libraries."

- Make sure home and holding library columns are not hidden in the
  table settings under Administration -> Table settings -> OPAC ->
  holdingst.
- Locate a bibliographic record in the OPAC which has multiple items
  from different libraries.
- Test that the home and current library columns sort correctly by
  library name.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2023-10-18 13:23:31 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-10-25 06:33:29 UTC
Pushed to 23.05.x for 23.05.05
Comment 8 Matt Blenkinsop 2023-11-13 13:46:12 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x