From 49c3c1edec8c2b8267b33655be4b712860a995b2 Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Tue, 3 Mar 2026 09:30:03 +0000 Subject: [PATCH] Bug 14962: (QA follow-up) Fix misuse of effective_etcbranch in Intranet scripts Fixed a regression caused by an update to the nomenclature of effective_etcbranch vs. effective_etc_library (the former being an accessor for the home or holding branch's code, the latter being an accessor for the entire Koha::Library object). Sponsored-by: ByWater Solutions --- catalogue/moredetail.pl | 16 ++++------------ .../prog/en/modules/circ/view_holdsqueue.tt | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 3806f6c0d30..7f6cc58c73e 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -273,19 +273,11 @@ foreach my $item (@items) { $item_info->{displays} = \@displays if @displays; } - if ( C4::Context->preference('UseDisplayModule') && $item->effective_homebranch ) { - my $effective_homebranch = $item->effective_homebranch; - my $effective_homebranch_id = $item->effective_homebranch->branchcode; + $item_info->{homebranch} = $item->effective_homebranch + if ( C4::Context->preference('UseDisplayModule') && $item->effective_homebranch ); - $item_info->{homebranch} = $effective_homebranch_id; - } - - if ( C4::Context->preference('UseDisplayModule') && $item->effective_holdingbranch ) { - my $effective_holdingbranch = $item->effective_holdingbranch; - my $effective_holdingbranch_id = $item->effective_holdingbranch->branchcode; - - $item_info->{holdingbranch} = $effective_holdingbranch_id; - } + $item_info->{holdingbranch} = $item->effective_holdingbranch + if ( C4::Context->preference('UseDisplayModule') && $item->effective_holdingbranch ); push @item_data, $item_info; } 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 a9e40cc1c3d..3cae993bb8b 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 @@ -250,8 +250,8 @@ [% IF ( itemsloo.biblio.biblioitem.isbn ) %]ISBN: [% itemsloo.biblio.biblioitem.isbn | html %][% END %] - [% itemsloo.item.effective_holdingbranch.branchname | html %] - [% itemsloo.item.effective_homebranch.branchname | html %] + [% itemsloo.item.effective_holdingbranch | html %] + [% itemsloo.item.effective_homebranch | html %] [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemsloo.item.effective_collection_code ) | html %] [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => itemsloo.item.effective_location ) | html %] [% ItemTypes.GetDescription( itemsloo.item.effective_itemtype ) | html %] -- 2.50.1 (Apple Git-155)