Bugzilla – Attachment 117170 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.58 KB, created by
Martin Renvoize (ashimema)
on 2021-02-22 16:26:20 UTC
(
hide
)
Description:
Bug 27729: Fix use of grep and split in CheckReserves
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-02-22 16:26:20 UTC
Size:
1.58 KB
patch
obsolete
>From 4880d826819b7e8390f7de61ef035a2e391b2207 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> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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.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 27729
:
117060
|
117075
| 117170