This new enhancement will add the ability to change the default holdings sort on OPAC displays to be by library.
Created attachment 51615 [details] [review] Bug 16552: Add the ability to change the default holdings sort This new enhancement will add the ability to change the default holdings sort on OPAC displays to be by library, instead of item type. This patch adds a new pref OPACHoldingsDefaultSortField with 3 different possible values: - Item type - Home library - Holding library Note that if OpacLocationBranchToDisplay is set not to display home libraries, unexpected behaviors might happen if OPACHoldingsDefaultSortField is set to "Home library", same for "Holding library". Test plan: - Confirm that the default value for OPACHoldingsDefaultSortField is 'first column' after executing the DB entry and that there is no change in the behavior (first column is used to sort the holdings table on the detail page). - Set OpacLocationBranchToDisplay to both and play with the different values of OPACHoldingsDefaultSortField => Confrm that the default column used to sort the table is correctly changed - Set the pref SeparateHoldings on => Confirm that both tables (Holdings and other holdings) are sorted using the OPACHoldingsDefaultSortField value. Sponsored-by: University of the Arts London
I ran into one problem with this. These were the combinations I tested: OPACHoldingsDefaultSortField -> Item type - OpacLocationBranchToDisplay -> home library - Good - OpacLocationBranchToDisplay -> holding library - Good - OpacLocationBranchToDisplay -> home and holding library - Good OPACHoldingsDefaultSortField -> Home library - OpacLocationBranchToDisplay -> home library - Sorts on third column, "Collection" - OpacLocationBranchToDisplay -> holding library - (Not applicable) - OpacLocationBranchToDisplay -> home and holding library - Good OPACHoldingsDefaultSortField -> Holding library - OpacLocationBranchToDisplay -> home library - (Not applicable) - OpacLocationBranchToDisplay -> holding library - Good - OpacLocationBranchToDisplay -> home and holding library - Good When I have OPACHoldingsDefaultSortField set to "Home library" and OpacLocationBranchToDisplay set to "home library" the sorting is on the "Collection" column instead of the home library one.
Created attachment 51636 [details] [review] Bug 16552: Add the ability to change the default holdings sort This new enhancement will add the ability to change the default holdings sort on OPAC displays to be by library, instead of item type. This patch adds a new pref OPACHoldingsDefaultSortField with 3 different possible values: - Item type - Home library - Holding library Note that if OpacLocationBranchToDisplay is set not to display home libraries, unexpected behaviors might happen if OPACHoldingsDefaultSortField is set to "Home library", same for "Holding library". Test plan: - Confirm that the default value for OPACHoldingsDefaultSortField is 'first column' after executing the DB entry and that there is no change in the behavior (first column is used to sort the holdings table on the detail page). - Set OpacLocationBranchToDisplay to both and play with the different values of OPACHoldingsDefaultSortField => Confrm that the default column used to sort the table is correctly changed - Set the pref SeparateHoldings on => Confirm that both tables (Holdings and other holdings) are sorted using the OPACHoldingsDefaultSortField value. Sponsored-by: University of the Arts London
(In reply to Owen Leonard from comment #2) > When I have OPACHoldingsDefaultSortField set to "Home library" and > OpacLocationBranchToDisplay set to "home library" the sorting is on the > "Collection" column instead of the home library one. Indeed, the tests are a bit more complicated :) Thanks for testing Owen!
(In reply to Jonathan Druart from comment #4) > (In reply to Owen Leonard from comment #2) > > When I have OPACHoldingsDefaultSortField set to "Home library" and > > OpacLocationBranchToDisplay set to "home library" the sorting is on the > > "Collection" column instead of the home library one. > > Indeed, the tests are a bit more complicated :) > Thanks for testing Owen! Unless I'm misunderstanding this, on my sandbox, it sorts correctly with OPACHoldingsDefaultSortField -> Home library - OpacLocationBranchToDisplay -> home library - Sorts on third column, "Collection" - OpacLocationBranchToDisplay -> holding library - (Not applicable) - OpacLocationBranchToDisplay -> home and holding library - Good That is, the Home Library column is selected and active. My column layout is Item type, Home Library, Collection, Call #, Status, Due Date
Patch tested with a sandbox, by Claire Gravely <c.gravely@arts.ac.uk>
Created attachment 51943 [details] [review] Bug 16552: Add the ability to change the default holdings sort This new enhancement will add the ability to change the default holdings sort on OPAC displays to be by library, instead of item type. This patch adds a new pref OPACHoldingsDefaultSortField with 3 different possible values: - Item type - Home library - Holding library Note that if OpacLocationBranchToDisplay is set not to display home libraries, unexpected behaviors might happen if OPACHoldingsDefaultSortField is set to "Home library", same for "Holding library". Test plan: - Confirm that the default value for OPACHoldingsDefaultSortField is 'first column' after executing the DB entry and that there is no change in the behavior (first column is used to sort the holdings table on the detail page). - Set OpacLocationBranchToDisplay to both and play with the different values of OPACHoldingsDefaultSortField => Confrm that the default column used to sort the table is correctly changed - Set the pref SeparateHoldings on => Confirm that both tables (Holdings and other holdings) are sorted using the OPACHoldingsDefaultSortField value. Sponsored-by: University of the Arts London Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
This works as described. I can imagine sometime in the future multiple criteria for sorting could be desirable. For example: home library, itemtype. Or: Home library, enumchron.
Created attachment 55668 [details] [review] [PASSED QA] Bug 16552: Add the ability to change the default holdings sort This new enhancement will add the ability to change the default holdings sort on OPAC displays to be by library, instead of item type. This patch adds a new pref OPACHoldingsDefaultSortField with 3 different possible values: - Item type - Home library - Holding library Note that if OpacLocationBranchToDisplay is set not to display home libraries, unexpected behaviors might happen if OPACHoldingsDefaultSortField is set to "Home library", same for "Holding library". Test plan: - Confirm that the default value for OPACHoldingsDefaultSortField is 'first column' after executing the DB entry and that there is no change in the behavior (first column is used to sort the holdings table on the detail page). - Set OpacLocationBranchToDisplay to both and play with the different values of OPACHoldingsDefaultSortField => Confrm that the default column used to sort the table is correctly changed - Set the pref SeparateHoldings on => Confirm that both tables (Holdings and other holdings) are sorted using the OPACHoldingsDefaultSortField value. Sponsored-by: University of the Arts London Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Pushed to master for 16.11, thanks Jonathan!