[Koha-bugs] [Bug 8127] New: Most Circulated Items not working right

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri May 18 19:48:37 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8127

          Priority: P5 - low
 Change sponsored?: ---
            Bug ID: 8127
          Assignee: gmcharlt at gmail.com
           Summary: Most Circulated Items not working right
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: nengard at gmail.com
          Hardware: All
            Status: NEW
           Version: master
         Component: Reports
           Product: Koha

I got this from a library:


I'm trying to get the "Most Circulated Items" report to give me something and I
am not having success.  I chose a date range of 4 months, then I chose a
library, then I chose a single item type (DVD1week) then I chose 20 for the
limit, then I chose "library" for the "By" part of the limit and go an empty
list.  So I went back and changed "library" to "Itemtype."  Now the system just
hangs up spinning away without ever giving results.


I wrote this to help for now - but the canned report should work:

SELECT count(s.datetime) AS circs, b.title, b.author,
       i.ccode 
FROM statistics s
JOIN items i USING (itemnumber)
LEFT JOIN biblio b USING (biblionumber)
WHERE DATE(s.datetime) > DATE_SUB(CURRENT_DATE(),INTERVAL 4 MONTH) 
      AND DATE(s.datetime)<=CURRENT_DATE() AND 
      s.itemnumber IS NOT NULL AND i.itype=<<Item type|itemtypes>> AND
i.hombranch=<<Home branch|branches>>
GROUP BY b.biblionumber 
ORDER BY circs DESC 
LIMIT 20

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list