From 209796ec0bb26e76b7dea23224ecaea87a7a8b51 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 23 Apr 2026 10:39:56 +0000 Subject: [PATCH] Bug 41956: Display hold_group_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test plan: 1) Enable DisplayAddHoldGroups sys pref 2) Place two title-level holds for the same patron on two different biblios. 3) Group them via the patron's holds page. Note the hold_group_id shown in the table and the URL when you click through to the group page (e.g. hold_group_id=42). 4) Create a second hold group for the same patron with two more holds. Confirm the hold_group_id is shown instead of the previous visual_hold_group_id. 5) Go to Circulation > Holds to pull (/cgi-bin/koha/circ/pendingreserves.pl). Confirm each grouped hold shows 'Hold group 42' as a clickable link, not the old 'part of a hold group' text. 6) Go to Circulation > Holds queue (/cgi-bin/koha/circ/view_holdsqueue.pl). Confirm the same — 'Hold group 42' link visible beneath the title. 7) Log in to the OPAC as that patron, go to 'Your summary' > 'Holds' tab. Confirm the 'Hold group' column shows 42. 8) Cancel one hold from the group. Confirm the group still appears on the patron's 'Holds' tab (one hold remains). 9) Cancel the last hold in the group. Confirm the no holds of the group and the group no longer appear on the patron's 'Holds' tab. Check holds history on the Staff UI: (/cgi-bin/koha/members/holdshistory.pl?borrowernumber=NNN) — both cancelled holds should still show 42 in the 'Hold group ID' column. Run tests: prove t/db_dependent/Reserves/HoldGroup.t prove t/db_dependent/Koha/Hold.t prove t/db_dependent/Koha/Patron.t prove t/db_dependent/api/v1/patrons_hold_groups.t prove t/db_dependent/api/v1/holds.t prove t/db_dependent/api/v1/patrons_holds.t Signed-off-by: Bob Bennhoff Signed-off-by: Andrew Fuerste Henry Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/holdshistory.tt | 3 +++ koha-tmpl/intranet-tmpl/prog/js/holds.js | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc | 6 +----- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index a68eaa6ae6..79e5f17453 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -110,7 +110,7 @@ [% IF ( biblio.biblioitem.publicationyear ) %]

[% biblio.biblioitem.publicationyear | html %]

[% END %] [% END %] [% IF ( hold.hold_group_id ) %] -

(part of a hold group)

+

(Hold group [% hold.hold_group_id | html %])

[% END %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index ac92e192e5..f2b0d73b93 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -222,7 +222,7 @@

[% INCLUDE 'biblio-title.inc' biblio=itemsloo.biblio link = 1 %]

[% itemsloo.biblionumber | html %]
[% IF ( itemsloo.hold_group_id ) %] -

(part of a hold group)

+

(Hold group [% itemsloo.hold_group_id | html %])

[% END %] [% itemsloo.biblio.author | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt index fcd6ff726a..004286a0a3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt @@ -83,6 +83,9 @@ Title + [% IF Koha.Preference('DisplayAddHoldGroups') %] + Hold group ID + [% END %] Author Barcode Call number diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index 2dd163ef2e..9afc8fe5f5 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -182,12 +182,12 @@ $(document).ready(function () { { data: function (oObj) { title = ""; - if (oObj.visual_hold_group_id) { + if (oObj.hold_group_id) { var link = '' + - oObj.visual_hold_group_id + + oObj.hold_group_id + ""; title = @@ -1629,7 +1629,7 @@ async function load_patron_holds_table(biblio_id, split_data) { searchable: false, render: function (data, type, row, meta) { const group_hold_message = row.hold_group_id - ? `
(${__("part of")} ${__("hold group")})
` + ? `
(${__("Hold group")} ${row.hold_group_id})
` : ""; // Handle status cases diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index 09f977ed33..22eee95a43 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -89,11 +89,7 @@ [% END %] [% IF Koha.Preference('DisplayAddHoldGroups') %] - [% IF HOLD.hold_group %] - [% HOLD.hold_group.visual_hold_group_id | html %] - [% ELSE %] - - [% END %] + [% HOLD.hold_group_id | html %] [% END %] [% HOLD.reservedate | $KohaDates %]