From e3a18c1171e7dfaa6370ce6e534459a3394bb00e Mon Sep 17 00:00:00 2001 From: David Cook Date: Mon, 14 Jul 2025 06:52:48 +0000 Subject: [PATCH] Bug 15516: (follow-up) integrate BZ 15516 and BZ 15565 This patch makes DisplayAddHoldGroups and DisplayMultiItemHolds work together, so that you can add multiple items to 1 hold group from the staff detail page, the OPAC detail page, or the OPAC search results. Note: At this time, you can't add multiple items to a hold group from the staff search results. This is due to the existing constraints in request.pl Over the last 10 years, in practice most hold groups have been formed at the OPAC anyway. Test plan: __OPAC search results__ - Enable both DisplayAddHoldGroups and DisplayMultiItemHolds - Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 - Choose "Gairm" and "Continuous delivery" and click "Place hold" - Checkbox "Treat as hold group" - Click "Show more options" for each record - Click "A specific item" for "Continuous delivery" - Checkbox both specific items for that title - Press "Confirm hold" - Note 3 holds are in the hold group - Cancel all the holds __OPAC detail page__ - Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=134 - Click "Place hold" - Checkbox "Treat as hold group" - Click "Show more options" - Choose "A specific item" - Checkbox both items - Click "Confirm hold" - Note 2 holds are in the hold group - Cancel all the holds __Staff detail page__ - Go to http://localhost:8081/cgi-bin/koha/reserve/request.pl?biblionumber=134&borrowernumber=51 - Choose "Hold a specific item" - Checkbox "Treat as hold group" - Checkbox both items - Click "Place hold" - Note 2 holds are in the hold group - Cancel all the holds --- .../intranet-tmpl/prog/en/modules/reserve/request.tt | 8 ++++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 09fe7106a5..b9d3edab89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -808,6 +808,14 @@ [% biblio_info.biblioitem.publicationyear | html %] [% END %] + + [% IF ( Koha.Preference('DisplayAddHoldGroups') && Koha.Preference('DisplayMultiItemHolds') ) %] +
  • + + + Place a hold on the next available title from this group +
  • + [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt index b5c5120c23..551c072f6c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -110,7 +110,7 @@ [% INCLUDE 'csrf-token.inc' %] Hold requests - [% IF ( Koha.Preference('DisplayAddHoldGroups') && ( multi_hold ) ) %] + [% IF ( Koha.Preference('DisplayAddHoldGroups') && ( multi_hold || Koha.Preference('DisplayMultiItemHolds') ) ) %]
      -- 2.39.5