From 06a9d79c93bfa47b7be5a75e2e4f3cf0e67b0d0e Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Wed, 1 Dec 2021 16:33:29 +0200 Subject: [PATCH] Bug 20447: (QA follow-up) include Koha::Holdings where needed (and remove uses where don't) Signed-off-by: Nick Clemens --- C4/XSLT.pm | 1 + Koha/Exporter/Record.pm | 2 ++ Koha/UI/Form/Builder/Item.pm | 1 + cataloguing/addholding.pl | 1 + cataloguing/additem.pl | 1 - misc/migration_tools/bulkmarcimport.pl | 1 - t/db_dependent/Exporter/Record.t | 1 - t/db_dependent/Koha/Item.t | 1 - 8 files changed, 5 insertions(+), 4 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index f09d9520b1..3f8f8a9329 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -30,6 +30,7 @@ use Koha::AuthorisedValues; use Koha::ItemTypes; use Koha::XSLT::Base; use Koha::Libraries; +use Koha::Holdings; my $engine; #XSLT Handler object my %authval_per_framework; diff --git a/Koha/Exporter/Record.pm b/Koha/Exporter/Record.pm index beff0d89e8..68d0f590eb 100644 --- a/Koha/Exporter/Record.pm +++ b/Koha/Exporter/Record.pm @@ -11,6 +11,8 @@ use Koha::CsvProfiles; use Koha::Logger; use List::Util qw( all any ); +use Koha::Holdings; + sub _get_record_for_export { my ($params) = @_; my $record_type = $params->{record_type}; diff --git a/Koha/UI/Form/Builder/Item.pm b/Koha/UI/Form/Builder/Item.pm index ee147472a1..b7b447c9f5 100644 --- a/Koha/UI/Form/Builder/Item.pm +++ b/Koha/UI/Form/Builder/Item.pm @@ -24,6 +24,7 @@ use C4::ClassSource qw( GetClassSources ); use Koha::DateUtils qw( dt_from_string ); use Koha::Libraries; +use Koha::Holdings; =head1 NAME diff --git a/cataloguing/addholding.pl b/cataloguing/addholding.pl index 71bd3503d1..5a8f21a02c 100755 --- a/cataloguing/addholding.pl +++ b/cataloguing/addholding.pl @@ -36,6 +36,7 @@ use Koha::DateUtils qw( dt_from_string ); use Koha::ItemTypes; use Koha::Libraries; +use Koha::Holdings; use Date::Calc qw(Today); use MARC::File::USMARC; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index fcd712b49b..4588b13fb5 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -37,7 +37,6 @@ use C4::Circulation qw( barcodedecode LostItem ); use C4::Barcodes; use C4::Barcodes::ValueBuilder; use Koha::DateUtils qw( dt_from_string ); -use Koha::Holdings; use Koha::Items; use Koha::ItemTypes; use Koha::Libraries; diff --git a/misc/migration_tools/bulkmarcimport.pl b/misc/migration_tools/bulkmarcimport.pl index 1fb4b43ba2..4f0583e154 100755 --- a/misc/migration_tools/bulkmarcimport.pl +++ b/misc/migration_tools/bulkmarcimport.pl @@ -36,7 +36,6 @@ use FindBin (); use Koha::Logger; use Koha::Biblios; -use Koha::Holdings; use Koha::SearchEngine; use Koha::SearchEngine::Search; diff --git a/t/db_dependent/Exporter/Record.t b/t/db_dependent/Exporter/Record.t index a4c00fa0de..cb0cf232fb 100755 --- a/t/db_dependent/Exporter/Record.t +++ b/t/db_dependent/Exporter/Record.t @@ -38,7 +38,6 @@ use Koha::Biblio::Metadata; use Koha::Biblio::Metadatas; use Koha::BiblioFramework; use Koha::BiblioFrameworks; -use Koha::Holdings; my $schema = Koha::Database->new->schema; $schema->storage->txn_begin; diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t index 465c837f61..6bd4787604 100755 --- a/t/db_dependent/Koha/Item.t +++ b/t/db_dependent/Koha/Item.t @@ -27,7 +27,6 @@ use C4::Biblio qw( GetMarcSubfieldStructure ); use C4::Circulation qw( AddIssue AddReturn ); use Koha::Caches; -use Koha::Holdings; use Koha::Items; use Koha::Database; use Koha::DateUtils qw( dt_from_string ); -- 2.30.2