Bugzilla – Attachment 82040 Details for
Bug 21413
Inventory - Allow skipping items with waiting holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21413: Fix condition to avoid operator bnding isssues
Bug-21413-Fix-condition-to-avoid-operator-bnding-i.patch (text/plain), 1.88 KB, created by
Tomás Cohen Arazi
on 2018-11-07 16:48:12 UTC
(
hide
)
Description:
Bug 21413: Fix condition to avoid operator bnding isssues
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2018-11-07 16:48:12 UTC
Size:
1.88 KB
patch
obsolete
>From 2355004e13ab69af36d7be914d9f47028500e05d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 7 Nov 2018 13:43:52 -0300 >Subject: [PATCH] Bug 21413: Fix condition to avoid operator bnding isssues > >The original WHERE condition wasn't enclosed in parenthesis, and hence >was subject to binding precedence issues in some situations. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Items.pm | 2 +- > t/db_dependent/Items/GetItemsForInventory.t | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 09167060a3..cf05a4c207 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -878,7 +878,7 @@ sub GetItemsForInventory { > > if ( $ignore_waiting_holds ) { > $query .= "LEFT JOIN reserves ON items.itemnumber = reserves.itemnumber "; >- push( @where_strings, q{reserves.found != 'W' OR reserves.found IS NULL} ); >+ push( @where_strings, q{(reserves.found != 'W' OR reserves.found IS NULL)} ); > } > > if ( @where_strings ) { >diff --git a/t/db_dependent/Items/GetItemsForInventory.t b/t/db_dependent/Items/GetItemsForInventory.t >index d2bd9f7002..af136dc465 100755 >--- a/t/db_dependent/Items/GetItemsForInventory.t >+++ b/t/db_dependent/Items/GetItemsForInventory.t >@@ -87,6 +87,7 @@ subtest 'Skip items with waiting holds' => sub { > homebranch => $library->id, > holdingbranch => $library->id, > itype => $itemtype->itemtype, >+ reserves => undef > } > } > ); >@@ -99,6 +100,7 @@ subtest 'Skip items with waiting holds' => sub { > homebranch => $library->id, > holdingbranch => $library->id, > itype => $itemtype->itemtype, >+ reserves => undef > } > } > ); >-- >2.19.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 21413
:
79432
|
79433
|
81376
|
81377
|
81378
|
81379
| 82040 |
82111
|
82168