Bug 10188 - Top Most-circulated items doesn't count current loans
Summary: Top Most-circulated items doesn't count current loans
Status: In Discussion
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:
URL:
Keywords:
Depends on: 17801
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-03 17:24 UTC by Tomás Cohen Arazi
Modified: 2020-09-03 09:43 UTC (History)
7 users (show)

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


Attachments
add union (6.89 KB, patch)
2014-07-22 20:59 UTC, Micah Bucy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2013-05-03 17:24:56 UTC
Right now, the 'calculate' function only counts circulation from the old_issues table, and not issues.
Comment 1 Mayank 2013-08-19 07:32:45 UTC
If you generate a report of Most Circulated Items, you get a list of titles and their respective number of checkouts.
When you click on one of the titles you see all the details about that record, 
from that screen you can view the checkout history of that record.
The figures of Number of checkouts from the generated report(Most Circulated Items) and the checkout history for that record are different.
Comment 2 Micah Bucy 2014-07-22 20:59:57 UTC
Created attachment 29959 [details] [review]
add union

This patch depends on my patch http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29958 for bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12628

This adds a union for `old_issues` and `issues`. Filtering that applied to `old_issues` before joins has been applied prior to the union on both `issues` and `old_issues`. Two new variables have been added to accomplish this $strsth2_filter and $strcalc_filter. The union is named as `circulated`. Where appropriate `old_issues` has been replaced with `circulated`.