Bugzilla – Attachment 50932 Details for
Bug 15533
Allow patrons and librarians to select itemtype when placing hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved
Bug-15533-Fix-ambiguous-SQL-query-in-CanItemBeRese.patch (text/plain), 1.17 KB, created by
Kyle M Hall (khall)
on 2016-04-28 15:35:27 UTC
(
hide
)
Description:
Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-04-28 15:35:27 UTC
Size:
1.17 KB
patch
obsolete
>From 92f81f27009c95f33fb425c5eee547379fd52d61 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 12 Apr 2016 15:18:20 +0200 >Subject: [PATCH] Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved > >Adding reserves.itemtype made a query to fail in CanItemBeReserved. >This patch prefixes the column names with the corresponding table names >to prevent that. > >You can trigger the error by running > prove t/db_dependent/Holds.t > >You should see something like this: > Column 'itemtype' in where clause is ambiguous >--- > C4/Reserves.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 55ec002..caf44ea 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -523,8 +523,8 @@ sub CanItemBeReserved{ > # level itemtype if the hold has no associated item > $querycount .= > C4::Context->preference('item-level_itypes') >- ? " AND COALESCE( itype, itemtype ) = ?" >- : " AND itemtype = ?" >+ ? " AND COALESCE( items.itype, biblioitems.itemtype ) = ?" >+ : " AND biblioitems.itemtype = ?" > if ( $ruleitemtype ne "*" ); > > my $sthcount = $dbh->prepare($querycount); >-- >2.1.4
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 15533
:
46462
|
48262
|
49227
|
49469
|
50016
|
50145
|
50926
|
50927
|
50928
|
50929
|
50931
|
50932
|
50933
|
50934
|
50937
|
50941
|
50942
|
50943
|
50944
|
50945
|
50946
|
50947
|
50948
|
50949