Bugzilla – Attachment 148556 Details for
Bug 29099
Add support for item bundles in the inventory tool
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29099: Fix item bundle fetch in inventory script
Bug-29099-Fix-item-bundle-fetch-in-inventory-scrip.patch (text/plain), 2.19 KB, created by
Marcel de Rooy
on 2023-03-22 14:14:16 UTC
(
hide
)
Description:
Bug 29099: Fix item bundle fetch in inventory script
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-03-22 14:14:16 UTC
Size:
2.19 KB
patch
obsolete
>From 0ea644ac7f358566eb7a5d22c397020f0155a5da Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 22 Mar 2023 14:04:24 +0000 >Subject: [PATCH] Bug 29099: Fix item bundle fetch in inventory script >Content-Type: text/plain; charset=utf-8 > >Using the newly created Koha objects. >--- > .../prog/en/modules/tools/inventory.tt | 2 +- > tools/inventory.pl | 17 +++++------------ > 2 files changed, 6 insertions(+), 13 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 813ee21873..cdff54d2ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -159,7 +159,7 @@ > <select id="items_bundle" name="items_bundle"> > <option value=""></option> > [% FOREACH item_bundle IN item_bundles %] >- <option value="[% item_bundle.itemnumber | html %]">[% item_bundle.biblio.title | html %]</option> >+ <option value="[% item_bundle.host | html %]">[% item_bundle.host_item.biblio.title | html %]</option> > [% END %] > </select> > </li> >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 96b4833ad6..ffcd436808 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -42,6 +42,7 @@ use Koha::AuthorisedValues; > use Koha::BiblioFrameworks; > use Koha::ClassSources; > use Koha::Items; >+use Koha::Item::Bundles; > > use List::MoreUtils qw( none ); > >@@ -70,18 +71,10 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-my $schema = Koha::Database->new()->schema(); >-my $item_bundles_rs = Koha::Items->search( >- { >- 'item_bundles_hosts.item' => { '!=' => undef }, >- }, >- { >- join => 'item_bundles_hosts', >- group_by => 'itemnumber', >- } >-); >- >-my @item_bundles = $item_bundles_rs->as_list; >+my @item_bundles = Koha::Item::Bundles->search( >+ {}, >+ { group_by => [ 'host' ], columns => [ 'host' ] }, >+)->as_list; > > my @authorised_value_list; > my $authorisedvalue_categories = ''; >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29099
:
125207
|
140898
|
146009
|
148550
|
148555
|
148556
|
176237
|
176238
|
176239