From 7cfea3d5a15dd81c6d6fe894fb7396e9e211e60c Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 3 Aug 2022 11:55:59 +0000 Subject: [PATCH] Bug 29144: Remove opac_info from GetItemsInfo Test plan: Run t/db_dependent/Items.t Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize --- C4/Items.pm | 2 -- t/db_dependent/Items.t | 14 +------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 443242be5d..5cfdb2d5c4 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -750,8 +750,6 @@ sub GetItemsInfo { holding.branchurl, holding.branchcode, holding.branchname, - holding.opac_info as holding_branch_opac_info, - home.opac_info as home_branch_opac_info, IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold FROM items LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t index c39a0b963f..c8d4a0f7db 100755 --- a/t/db_dependent/Items.t +++ b/t/db_dependent/Items.t @@ -192,7 +192,7 @@ subtest 'ModItemTransfer tests' => sub { subtest 'GetItemsInfo tests' => sub { - plan tests => 9; + plan tests => 7; $schema->storage->txn_begin; @@ -230,21 +230,9 @@ subtest 'GetItemsInfo tests' => sub { } )->itemnumber; - my $library = Koha::Libraries->find( $library1->{branchcode} ); - $library->opac_info("homebranch OPAC info"); - $library->store; - - $library = Koha::Libraries->find( $library2->{branchcode} ); - $library->opac_info("holdingbranch OPAC info"); - $library->store; - my @results = GetItemsInfo( $biblio->biblionumber ); ok( @results, 'GetItemsInfo returns results'); - is( $results[0]->{ home_branch_opac_info }, "homebranch OPAC info", - 'GetItemsInfo returns the correct home branch OPAC info notice' ); - is( $results[0]->{ holding_branch_opac_info }, "holdingbranch OPAC info", - 'GetItemsInfo returns the correct holding branch OPAC info notice' ); is( exists( $results[0]->{ onsite_checkout } ), 1, 'GetItemsInfo returns a onsite_checkout key' ); is( $results[0]->{ restricted }, 1, -- 2.20.1