From d7537b40ab9c9b3fd0cdcb74891179401008e9bc Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 26 Mar 2020 09:24:49 -0400 Subject: [PATCH] Bug 24860: Add hold's item group to holds table on circulation.pl and moremember.pl Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Rebecca Coert Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/js/holds.js | 4 ++++ svc/holds | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index 58ecb622c2..3465847de2 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -278,6 +278,10 @@ $(document).ready(function() { data += __("Next available %s item").format(oObj.itemtype_limit); } + if ( oObj.item_group_id ) { + data += _("Next available item group %s item").format( oObj.item_group_description ); + } + if ( oObj.barcode ) { data += ""; if ( oObj.found == "W" ) { diff --git a/svc/holds b/svc/holds index f69b1a535d..8043297573 100755 --- a/svc/holds +++ b/svc/holds @@ -68,6 +68,7 @@ my $holds_rs = Koha::Holds->search( my @holds; while ( my $h = $holds_rs->next() ) { my $item = $h->item(); + my $item_group = $h->item_group(); my $biblionumber = $h->biblio()->biblionumber(); @@ -153,6 +154,11 @@ while ( my $h = $holds_rs->next() ) { } } + if ($item_group) { + $hold->{item_group_id} = $item_group->id; + $hold->{item_group_description} = $item_group->description; + } + push( @holds, $hold ); } -- 2.39.5