From 4111853fa2195d46d679ea3c1b3219246d23ac7c 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 --- 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 964528a33d..72daed4d5b 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 c02602c0ff..30fa411f38 100755 --- a/svc/holds +++ b/svc/holds @@ -69,6 +69,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(); @@ -155,6 +156,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.30.2