Bugzilla – Attachment 50944 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]
[PASSED QA] Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved
PASSED-QA-Bug-15533-Fix-ambiguous-SQL-query-in-Can.patch (text/plain), 1.24 KB, created by
Katrin Fischer
on 2016-04-28 19:03:03 UTC
(
hide
)
Description:
[PASSED QA] Bug 15533: Fix 'ambiguous' SQL query in CanItemBeReserved
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-04-28 19:03:03 UTC
Size:
1.24 KB
patch
obsolete
>From 2bf2faaa1249eda2c07f5ae0edd31251e280d9a3 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] [PASSED QA] 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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > 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); >-- >1.9.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 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