Bugzilla – Attachment 152122 Details for
Bug 33942
Improve performance of local holds priority by temporarily caching patrons and items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33942: Improve performance of local holds priority by temporarily caching patrons and items
Bug-33942-Improve-performance-of-local-holds-prior.patch (text/plain), 1.70 KB, created by
Kyle M Hall (khall)
on 2023-06-07 16:46:42 UTC
(
hide
)
Description:
Bug 33942: Improve performance of local holds priority by temporarily caching patrons and items
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-06-07 16:46:42 UTC
Size:
1.70 KB
patch
obsolete
>From 844de75509db4820dbc5620f4974840ab8bcf055 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 7 Jun 2023 12:32:28 -0400 >Subject: [PATCH] Bug 33942: Improve performance of local holds priority by > temporarily caching patrons and items > >Test Plan: >1) Apply this patch >2) prove -r t/db_dependent/Hold* >3) Note all tests continue to pass >--- > C4/Reserves.pm | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 987543e1cd..0905002d6c 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -930,13 +930,21 @@ sub CheckReserves { > } elsif ($res->{'found'} && $res->{'found'} eq 'T') { > return ( "Transferred", $res, \@reserves ); # Found determinated hold, e. g. the transferred one > } else { >+ my $patrons; >+ my $items; >+ > my $patron; > my $item; > my $local_hold_match; > >+ my $borrowernumber = $res->{borrowernumber}; >+ > if ($LocalHoldsPriority) { >- $patron = Koha::Patrons->find( $res->{borrowernumber} ); >- $item = Koha::Items->find($itemnumber); >+ $patron = $patrons->{$borrowernumber} || Koha::Patrons->find($borrowernumber); >+ $patrons->{$borrowernumber} ||= $patron; >+ >+ $item = $items->{$itemnumber} || Koha::Items->find($itemnumber); >+ $items->{$itemnumber} ||= $item; > > unless ($item->exclude_from_local_holds_priority || $patron->category->exclude_from_local_holds_priority) { > my $local_holds_priority_item_branchcode = >-- >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 33942
: 152122