From 0ba92b25ce535a908d6cefbfb7d597bdc9b30737 Mon Sep 17 00:00:00 2001 From: Jake Deery Date: Tue, 3 Mar 2026 08:58:13 +0000 Subject: [PATCH] Bug 14962: (QA follow-up) Fixed missing branch and collection data This patch fixes an issue in the new effective methods added to Item.pm. We now use the existing item data, if no effective override is provided on the active display. Sponsored-by: ByWater Solutions --- Koha/Item.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Koha/Item.pm b/Koha/Item.pm index 37f00a8950d..e26b4ad5466 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -2244,10 +2244,7 @@ sub effective_location { my ($self) = @_; if ( my $display = $self->active_display ) { - return $display->display_location - if ( $display->display_location ); - - return "DISPLAY: " . $display->display_name; + return $display->display_location || "Display: " . $display->display_name; } return $self->location; @@ -2266,7 +2263,7 @@ sub effective_collection_code { my ($self) = @_; if ( my $display = $self->active_display ) { - return $display->display_code; + return $display->display_code || $self->ccode; } return $self->ccode; @@ -2303,7 +2300,7 @@ sub effective_homebranch { my ($self) = @_; if ( my $display = $self->active_display ) { - return $display->get_column('display_branch'); + return $display->get_column('display_branch') || $self->homebranch; } return $self->get_column('homebranch'); @@ -2340,7 +2337,7 @@ sub effective_holdingbranch { my ($self) = @_; if ( my $display = $self->active_display ) { - return $display->get_column('display_holding_branch'); + return $display->get_column('display_holding_branch') || $self->holdingbranch; } return $self->get_column('holdingbranch'); -- 2.50.1 (Apple Git-155)