Bugzilla – Attachment 101356 Details for
Bug 24185
'If all unavailable' state for 'on shelf holds' makes holds page very slow if there's a lot of items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24185: Make holds page faster - call to subroutine moved below "if"
Bug-24185-Make-holds-page-faster---call-to-subrout.patch (text/plain), 1.45 KB, created by
Andrii Nugged
on 2020-03-22 11:40:04 UTC
(
hide
)
Description:
Bug 24185: Make holds page faster - call to subroutine moved below "if"
Filename:
MIME Type:
Creator:
Andrii Nugged
Created:
2020-03-22 11:40:04 UTC
Size:
1.45 KB
patch
obsolete
>From 41c81d3e29919204605ba3c5d462fb05e1f556bb Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Thu, 19 Dec 2019 18:20:24 +0200 >Subject: [PATCH] Bug 24185: Make holds page faster - call to subroutine moved > below "if" > >`$on_shelf_holds` was assigned before "return .. if" but not used in that code piece, >so sometimes it was useless. Moved assignment after "return .. if". >--- > C4/Reserves.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 2099a91aa5..c549288929 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1241,8 +1241,6 @@ sub IsAvailableForItemLevelRequest { > $item->withdrawn || > ($item->damaged && !C4::Context->preference('AllowHoldsOnDamagedItems')); > >- my $on_shelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } ); >- > if ($pickup_branchcode) { > my $destination = Koha::Libraries->find($pickup_branchcode); > return 0 unless $destination; >@@ -1256,6 +1254,8 @@ sub IsAvailableForItemLevelRequest { > return 0 unless $branchitemrule->{hold_fulfillment_policy} ne 'holdgroup' || $home_library->validate_hold_sibling( {branchcode => $pickup_branchcode} ); > } > >+ my $on_shelf_holds = Koha::CirculationRules->get_onshelfholds_policy( { item => $item, patron => $patron } ); >+ > if ( $on_shelf_holds == 1 ) { > return 1; > } elsif ( $on_shelf_holds == 2 ) { >-- >2.17.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 24185
:
96079
|
96080
|
96151
|
96354
|
96460
|
96461
|
96464
|
96491
|
96492
|
96493
|
96500
|
97375
|
97376
|
97377
|
97378
|
101355
|
101356
|
101357
|
101358
|
101607
|
101608
|
101609
|
101611
|
101613
|
101614
|
101615
|
101616