See bug 26302: > 3 - Not blocker: it would be nice to have a '-1' option for > resultsMaxItemsUnavailable to preserve previous grouping - in large > consortia I know they have not wanted to display individual NFL items. This follow-up would make it possible to group by (sub)status and not on branch level first.
Created attachment 124688 [details] [review] Bug 28831: Database revision, add new preference The preference OPACResultsUnavailableGroupingBy allows you to group unavailable items by substatus, only showing item counts, on the OPAC XSLT results. This is meant to be useful for larger consortia. Test plan: Run dbrev. Check new pref on Admin, preferences, OPAC tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 124689 [details] [review] Bug 28831: Add choose/when, and change indentation As a first step: [1] Add the new pref OPACResultsUnavailableGroupingBy in the xslt, and pass it via C4/XSLT. [2] Add a choose/when construction in the third part of Availability. [3] Add indentation (8 spaces) of the inner block handling group by branch. Test plan: Make sure that OPACResultsUnavailableGroupingBy eq branch. Verify that OPAC results are still untouched. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 124690 [details] [review] Bug 28831: Add the new group by substatus-block Test plan: Change OPACResultsUnavailableGroupingBy to substatus. Verify the result on opac results. (You need a few unavailable items with different statuses on a few branches.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
David, Nick: This is a small follow-up on the XSLT changes on bug 26302. Could you please have a look?
As example. This allows you to toggle between: Not available: Centerville: Checked out (1). Centerville: Ordered (1). Fairfield: Checked out (1). Fairfield: Withdrawn (1). OR Not available: Checked out (2). Ordered (1). Withdrawn (1). In the first case the unavailable items = 0, groupby = branch. In the second case only groupby = substatus is relevant.
I get this message when updating the database: root@kohadevbox:koha(bz28831)$ updatedatabase Bareword found where operator expected at /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_28831.pl line 11, near "('OPACResultsUnavailableGroupingBy','branch','branch|substatus" (Might be a runaway multi-line || string starting on line 9) (Missing operator before substatus?) DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_28831.pl [12:29:18] ERROR - {UNKNOWN}: Can't use an undefined value as a subroutine reference at /kohadevbox/koha/C4/Installer.pm line 735. at /kohadevbox/koha/C4/Installer.pm line 737
Created attachment 124706 [details] [review] Bug 28831: Database revision, add new preference The preference OPACResultsUnavailableGroupingBy allows you to group unavailable items by substatus, only showing item counts, on the OPAC XSLT results. This is meant to be useful for larger consortia. Test plan: Run dbrev. Check new pref on Admin, preferences, OPAC tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 124707 [details] [review] Bug 28831: Add choose/when, and change indentation As a first step: [1] Add the new pref OPACResultsUnavailableGroupingBy in the xslt, and pass it via C4/XSLT. [2] Add a choose/when construction in the third part of Availability. [3] Add indentation (8 spaces) of the inner block handling group by branch. Test plan: Make sure that OPACResultsUnavailableGroupingBy eq branch. Verify that OPAC results are still untouched. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 124708 [details] [review] Bug 28831: Add the new group by substatus-block Test plan: Change OPACResultsUnavailableGroupingBy to substatus. Verify the result on opac results. (You need a few unavailable items with different statuses on a few branches.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to David Nind from comment #6) > I get this message when updating the database: > > root@kohadevbox:koha(bz28831)$ updatedatabase > Bareword found where operator expected at > /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_28831.pl line 11, > near "('OPACResultsUnavailableGroupingBy','branch','branch|substatus" > (Might be a runaway multi-line || string starting on line 9) > (Missing operator before substatus?) > DEV atomic update > /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_28831.pl [12:29:18] > ERROR - {UNKNOWN}: Can't use an undefined value as a subroutine reference at > /kohadevbox/koha/C4/Installer.pm line 735. at > /kohadevbox/koha/C4/Installer.pm line 737 Ah thanks for noting. The pipe char ended the quote command. Had to add a backslash. And removed a comma. Tested now, should work.
Created attachment 124804 [details] [review] Bug 28831: Database revision, add new preference The preference OPACResultsUnavailableGroupingBy allows you to group unavailable items by substatus, only showing item counts, on the OPAC XSLT results. This is meant to be useful for larger consortia. Test plan: Run dbrev. Check new pref on Admin, preferences, OPAC tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 124805 [details] [review] Bug 28831: Add choose/when, and change indentation As a first step: [1] Add the new pref OPACResultsUnavailableGroupingBy in the xslt, and pass it via C4/XSLT. [2] Add a choose/when construction in the third part of Availability. [3] Add indentation (8 spaces) of the inner block handling group by branch. Test plan: Make sure that OPACResultsUnavailableGroupingBy eq branch. Verify that OPAC results are still untouched. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 124806 [details] [review] Bug 28831: Add the new group by substatus-block Test plan: Change OPACResultsUnavailableGroupingBy to substatus. Verify the result on opac results. (You need a few unavailable items with different statuses on a few branches.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com>
(In reply to David Nind from comment #13) > Signed-off-by: David Nind <david@davidnind.com> Thanks David
Created attachment 125894 [details] [review] Bug 28831: Database revision, add new preference The preference OPACResultsUnavailableGroupingBy allows you to group unavailable items by substatus, only showing item counts, on the OPAC XSLT results. This is meant to be useful for larger consortia. Test plan: Run dbrev. Check new pref on Admin, preferences, OPAC tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 125895 [details] [review] Bug 28831: Add choose/when, and change indentation As a first step: [1] Add the new pref OPACResultsUnavailableGroupingBy in the xslt, and pass it via C4/XSLT. [2] Add a choose/when construction in the third part of Availability. [3] Add indentation (8 spaces) of the inner block handling group by branch. Test plan: Make sure that OPACResultsUnavailableGroupingBy eq branch. Verify that OPAC results are still untouched. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 125896 [details] [review] Bug 28831: Add the new group by substatus-block Test plan: Change OPACResultsUnavailableGroupingBy to substatus. Verify the result on opac results. (You need a few unavailable items with different statuses on a few branches.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Needs rebase on top of 29199
Created attachment 126031 [details] [review] Bug 28831: Database revision, add new preference The preference OPACResultsUnavailableGroupingBy allows you to group unavailable items by substatus, only showing item counts, on the OPAC XSLT results. This is meant to be useful for larger consortia. Test plan: Run dbrev. Check new pref on Admin, preferences, OPAC tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 126032 [details] [review] Bug 28831: Add choose/when, and change indentation As a first step: [1] Add the new pref OPACResultsUnavailableGroupingBy in the xslt, and pass it via C4/XSLT. [2] Add a choose/when construction in the third part of Availability. [3] Add indentation (8 spaces) of the inner block handling group by branch. Test plan: Make sure that OPACResultsUnavailableGroupingBy eq branch. Verify that OPAC results are still untouched. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 126033 [details] [review] Bug 28831: Add the new group by substatus-block Test plan: Change OPACResultsUnavailableGroupingBy to substatus. Verify the result on opac results. (You need a few unavailable items with different statuses on a few branches.) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.11, thanks to everybody involved!
Blocked by bug 29199.