Bug 16703 - Home > Reports > Circulation statistics showing no circulation
Summary: Home > Reports > Circulation statistics showing no circulation
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-09 16:11 UTC by Barton Chittenden
Modified: 2018-10-17 22:35 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2016-06-09 16:11:37 UTC
koha/reports/issues_stats.pl is giving incorrect results.

Here are the parameters added:

Period
  From: 01/01/2016
  To  : 06/07/2016
Type: Checkout
group by: None
Library: Takoma Park Maryland Library
Home Library: Takoma Park Maryland Library
Holding Library: Takoma Park Maryland Library

The output is:

Circulation statistics
Filtered on:
Period From 01/01/2016
Period To 06/07/2016
Library = TPML
Home library = TPML
Holding library = TPML
Event issue
/       TOTAL
TOTAL   0

Here are the actual circulation statistics:

select count(*) from statistics where type = 'issue' and branch='TPML' and date(datetime) between '2016-01-01' 
and '2016-06-07';                                                                                                     
+----------+
| count(*) |
+----------+
|    33891 |
+----------+

To re-create:

1/ Choose a koha instance that has circulation
2/ Go to Home > Reports > Circulation statistics
3/ Select the following:
    Period
      From: <Your start date>
      To  : <Your end date>
    Type: Checkout
    group by: None
    Library: <BRANCH>
    Home Library: <BRANCH>
    Holding Library: <BRANCH>
    Cell Value: Count total items
    Output: To screen into the browser
4/ Click submit

    You will see

    Event      issue
    /          TOTAL
    TOTAL      0

5/ select count(*) from statistics where type = 'issue' and branch='BRANCH' and date(datetime) between '<Your start date>' and '<Your end date>'
  (Replace BRANCH and dates with values corresponding to the report above).

Assuming that your date range contains checkouts, the output from issues_stats.pl is clearly incorrect.