Bugzilla – Attachment 113520 Details for
Bug 26963
Improve Koha::Item::pickup_locations performance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26963: (QA follow-up) Fix cases where we expected a list
Bug-26963-QA-follow-up-Fix-cases-where-we-expected.patch (text/plain), 2.19 KB, created by
Martin Renvoize (ashimema)
on 2020-11-11 16:08:11 UTC
(
hide
)
Description:
Bug 26963: (QA follow-up) Fix cases where we expected a list
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-11-11 16:08:11 UTC
Size:
2.19 KB
patch
obsolete
>From 418fa516e80dfe7508c30fed38e9815af2ff8f18 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 11 Nov 2020 14:09:24 +0000 >Subject: [PATCH] Bug 26963: (QA follow-up) Fix cases where we expected a list > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Biblio.pm | 2 +- > Koha/Template/Plugin/Branches.pm | 2 +- > reserve/request.pl | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index 29c7d1edb4..4368eef386 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -220,7 +220,7 @@ sub pickup_locations { > > my @pickup_locations; > foreach my $item_of_bib ($self->items->as_list) { >- push @pickup_locations, @{ $item_of_bib->pickup_locations( {patron => $patron} ) }; >+ push @pickup_locations, @{ $item_of_bib->pickup_locations( {patron => $patron} )->as_list() }; > } > > my %seen; >diff --git a/Koha/Template/Plugin/Branches.pm b/Koha/Template/Plugin/Branches.pm >index 05932dac68..f0bbf40cd7 100644 >--- a/Koha/Template/Plugin/Branches.pm >+++ b/Koha/Template/Plugin/Branches.pm >@@ -117,7 +117,7 @@ sub pickup_locations { > if ($item) { > $item = Koha::Items->find($item) > unless ref($item) eq 'Koha::Item'; >- @libraries = @{ $item->pickup_locations( { patron => $patron } ) } >+ @libraries = $item->pickup_locations( { patron => $patron } ) > if defined $item; > } > elsif ($biblio) { >diff --git a/reserve/request.pl b/reserve/request.pl >index 4df90a78a0..7e4c2c5819 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -572,7 +572,7 @@ foreach my $biblionumber (@biblionumbers) { > $item->{pickup_locations_code} = 'all'; > } else { > my $arr_locations = Koha::Items->find($itemnumber) >- ->pickup_locations( { patron => $patron } ); >+ ->pickup_locations( { patron => $patron } )->as_list(); > > $item->{pickup_locations} = join( ', ', > map { $_->unblessed->{branchname} } @$arr_locations); >-- >2.20.1
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 26963
:
113282
|
113283
|
113329
|
113330
|
113333
|
113339
|
113340
|
113419
|
113420
|
113422
|
113423
|
113424
|
113425
|
113451
|
113452
|
113453
|
113454
|
113455
|
113480
|
113481
|
113483
|
113498
|
113503
|
113504
|
113505
|
113506
|
113507
|
113508
|
113509
|
113510
|
113511
|
113512
|
113513
|
113514
|
113515
|
113516
|
113517
|
113518
|
113519
|
113520
|
113521
|
113523
|
113524
|
113525
|
113526
|
113527
|
113528
|
113529
|
113530
|
113531
|
113586
|
113729