Bugzilla – Attachment 139067 Details for
Bug 31314
Remove GetItemsInfo from opac-reserve.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31314: (QA follow-up) Search Koha::Items not $biblio->items
Bug-31314-QA-follow-up-Search-KohaItems-not-biblio.patch (text/plain), 1.77 KB, created by
Nick Clemens (kidclamp)
on 2022-08-12 15:39:10 UTC
(
hide
)
Description:
Bug 31314: (QA follow-up) Search Koha::Items not $biblio->items
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-08-12 15:39:10 UTC
Size:
1.77 KB
patch
obsolete
>From 129804cc50cc16cf513a97c2b544c78e474ac045 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 12 Aug 2022 15:04:30 +0000 >Subject: [PATCH] Bug 31314: (QA follow-up) Search Koha::Items not > $biblio->items > >To get the host items we need to search all items, not those limited to the >same biblionumber > >To test: >1 - Enable EasyAnalytics >2 - Attach an item to a record >3 - Confirm it is listed in the items list on opac reserve > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > opac/opac-reserve.pl | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 6cdbbbd3df..26a4d8c23b 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -1,5 +1,6 @@ > #!/usr/bin/perl > >+ > # Copyright Katipo Communications 2002 > # Copyright Koha Development team 2012 > # >@@ -151,20 +152,16 @@ foreach my $biblioNumber (@biblionumbers) { > > my $marcrecord = $biblio->metadata->record; > >- my $items = >- $biblio->items->filter_by_visible_in_opac( { patron => $patron } ); >- my $host_items = >- $biblio->host_items->filter_by_visible_in_opac( { patron => $patron } ); >- $items = $biblio->items->search_ordered( >- { >+ my $items = Koha::Items->search_ordered( >+ [ >+ biblionumber => $biblioNumber, > itemnumber => { > -in => [ >- $items->get_column('itemnumber'), >- $host_items->get_column('itemnumber') >+ $biblio->host_items->get_column('itemnumber') > ] > } >- } >- ); >+ ], >+ )->filter_by_visible_in_opac({ patron => $patron }); > > $biblioData->{items} = [$items->as_list]; # FIXME Potentially a lot in memory here! > >-- >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 31314
:
138823
|
138882
|
138916
|
139066
| 139067 |
139068