From 61dd79e7b4abd83471f39e5ab6c0e697afac6054 Mon Sep 17 00:00:00 2001 From: helene hickey Date: Tue, 15 Jan 2019 23:07:34 +0000 Subject: [PATCH] Bug 20274 When the system preference for item-level_itypes changed, it gave a zero result. 1) Go to reports then catalog by item types 2) Pick a location and look at table 3) Change the system prefernce of item-level_itypes 4) Verify a zero result 5) Apply patch and retry 6) Verify that result does not change to zero on either preference --- reports/itemtypes.plugin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reports/itemtypes.plugin b/reports/itemtypes.plugin index ffa6fb7a43..6884369ce2 100755 --- a/reports/itemtypes.plugin +++ b/reports/itemtypes.plugin @@ -53,7 +53,7 @@ sub calculate { } else { $sth = $dbh->prepare(" - SELECT itemtype, description, biblioitems.itemtype, COUNT(*) AS total + SELECT biblioitems.itemtype, description, biblioitems.itemtype, COUNT(*) AS total FROM itemtypes, biblioitems, items WHERE biblioitems.itemtype=itemtypes.itemtype AND items.biblioitemnumber=biblioitems.biblioitemnumber @@ -65,7 +65,7 @@ sub calculate { } else { if (C4::Context->preference('item-level_itypes')) { $sth = $dbh->prepare(" - SELECT itemtype, description,items.itype AS itemtype, COUNT(*) AS total + SELECT biblioitems.itemtype, description,items.itype AS itemtype, COUNT(*) AS total FROM itemtypes,items WHERE items.itype=itemtypes.itemtype GROUP BY items.itype -- 2.11.0