Bugzilla – Attachment 33941 Details for
Bug 13332
Items disappear from staff detail page when there is an on-site checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13332: Fix conflict between 5304 and 10860
PASSED-QA-Bug-13332-Fix-conflict-between-5304-and-.patch (text/plain), 3.12 KB, created by
Katrin Fischer
on 2014-11-26 06:51:14 UTC
(
hide
)
Description:
[PASSED QA] Bug 13332: Fix conflict between 5304 and 10860
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-11-26 06:51:14 UTC
Size:
3.12 KB
patch
obsolete
>From fdda139a346968c93c5a5017dc29b88214087532 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 25 Nov 2014 15:04:25 +0100 >Subject: [PATCH] [PASSED QA] Bug 13332: Fix conflict between 5304 and 10860 > >These 2 bugs are in conflict. >The first one always join the issue table, the second one join on this >table too if the OnSiteCheckouts pref is enable. >So DBI raises an error if the pref is enabled (2 joins on the same >table). > >This patch removes the conditional join. > >Test plan: >Go on a detail record page with items and verify that items are list and >that the error no more appears in the log file. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >Reproduced the problem, the patch fixes it, no noticeable regression found. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described, items are visible again. >Passes tests and QA script. >--- > C4/Items.pm | 5 +---- > t/db_dependent/Items.t | 4 +++- > 2 files changed, 4 insertions(+), 5 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index ab2456b..e63ef1b 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1298,6 +1298,7 @@ sub GetItemsInfo { > items.notforloan as itemnotforloan, > issues.borrowernumber, > issues.date_due as datedue, >+ issues.onsite_checkout, > borrowers.cardnumber, > borrowers.surname, > borrowers.firstname, >@@ -1311,8 +1312,6 @@ sub GetItemsInfo { > holding.opac_info as holding_branch_opac_info, > home.opac_info as home_branch_opac_info > "; >- $query .= ", issues.onsite_checkout" >- if C4::Context->preference("OnSiteCheckouts"); > $query .= " > FROM items > LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode >@@ -1325,8 +1324,6 @@ sub GetItemsInfo { > LEFT JOIN serial USING (serialid) > LEFT JOIN itemtypes ON itemtypes.itemtype = " > . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); >- $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber" >- if C4::Context->preference("OnSiteCheckouts"); > $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ; > my $sth = $dbh->prepare($query); > $sth->execute($biblionumber); >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index 243ab2d..d94b7b7 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -157,7 +157,7 @@ subtest 'GetHiddenItemnumbers tests' => sub { > > subtest 'GetItemsInfo tests' => sub { > >- plan tests => 3; >+ plan tests => 4; > > # Start transaction > $dbh->{AutoCommit} = 0; >@@ -186,6 +186,8 @@ subtest 'GetItemsInfo tests' => sub { > 'GetItemsInfo returns the correct home branch OPAC info notice' ); > is( $results[0]->{ holding_branch_opac_info }, "holdingbranch OPAC info", > 'GetItemsInfo returns the correct holding branch OPAC info notice' ); >+ is( exists( $results[0]->{ onsite_checkout } ), 1, >+ 'GetItemsInfo returns a onsite_checkout key' ); > > $dbh->rollback; > }; >-- >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 13332
:
33905
|
33906
|
33927
| 33941