Bugzilla – Attachment 117060 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.50 KB, created by
Marcel de Rooy
on 2021-02-19 10:21:08 UTC
(
hide
)
Description:
Bug 27729: Fix use of grep and split in CheckReserves
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2021-02-19 10:21:08 UTC
Size:
1.50 KB
patch
obsolete
>From 01dd1e2cd99c7f0483a0b30cc2939d975f77aa40 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 >Content-Type: text/plain; charset=utf-8 > >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> >--- > C4/Reserves.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 0c317f6d53..5ae9f2e4b4 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.11.0
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