From fcc565f02597fa7c65a4fe9632a2ae90f513d8f4 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 8 Jan 2025 14:14:43 +0000 Subject: [PATCH] Bug 29099: Fix item bundle fetch in inventory script Using the newly created Koha objects. --- .../prog/en/modules/tools/inventory.tt | 2 +- tools/inventory.pl | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt index b7203b08469..68fa5795faa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt @@ -187,7 +187,7 @@ diff --git a/tools/inventory.pl b/tools/inventory.pl index a0128b23aa3..195e4681898 100755 --- a/tools/inventory.pl +++ b/tools/inventory.pl @@ -71,15 +71,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my $schema = Koha::Database->new()->schema(); -my $items_bundle_rs = $schema->resultset('ItemsBundle'); -my @items_bundles = $items_bundle_rs->search( - undef, - { - order_by => { -asc => ['biblionumber.title'] }, - join => ['biblionumber'], - } -); +my @items_bundles = Koha::Item::Bundles->search( + {}, + { group_by => ['host'], columns => ['host'] } +)->as_list; my @authorised_value_list; my $authorisedvalue_categories = ''; -- 2.48.1