Bugzilla – Attachment 117075 Details for
Bug 27729
Code around SkipHoldTrapOnNotForLoanValue contains two perl bugs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27729: Fix use of grep and split in CheckReserves
Bug-27729-Fix-use-of-grep-and-split-in-CheckReserv.patch (text/plain), 1.53 KB, created by
Kyle M Hall (khall)
on 2021-02-19 12:51:57 UTC
(
hide
)
Description:
Bug 27729: Fix use of grep and split in CheckReserves
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-02-19 12:51:57 UTC
Size:
1.53 KB
patch
obsolete
>From a5f67b6f75d64cf99b8d7c04caf6e48642add85d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 19 Feb 2021 10:17:26 +0000 >Subject: [PATCH] Bug 27729: Fix use of grep and split in CheckReserves > >A few lines of code were added to CheckReserves containing the wrong >use of two perl functions: grep and split on bug 25232. >A test was added even making these things pass. > >Test plan: >Run t/db../Holds.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Reserves.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index a658646407..08fb6b4fb1 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -831,8 +831,8 @@ sub CheckReserves { > # if item is not for loan it cannot be reserved either..... > # except where items.notforloan < 0 : This indicates the item is holdable. > >- my @SkipHoldTrapOnNotForLoanValue = split( '|', C4::Context->preference('SkipHoldTrapOnNotForLoanValue') ); >- return if @SkipHoldTrapOnNotForLoanValue && grep( $notforloan_per_item, @SkipHoldTrapOnNotForLoanValue ); >+ my @SkipHoldTrapOnNotForLoanValue = split( '\|', C4::Context->preference('SkipHoldTrapOnNotForLoanValue') ); >+ return if grep { $_ eq $notforloan_per_item } @SkipHoldTrapOnNotForLoanValue; > > my $dont_trap = C4::Context->preference('TrapHoldsOnOrder') ? ($notforloan_per_item > 0) : ($notforloan_per_item && 1 ); > return if $dont_trap or $notforloan_per_itemtype; >-- >2.24.1 (Apple Git-126)
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 27729
:
117060
|
117075
|
117170