Bug 10188 - Top Most-circulated items doesn't count current loans
Summary: Top Most-circulated items doesn't count current loans
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact:
URL:
Keywords:
Depends on: 17801
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-03 17:24 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2023-01-26 10:00 UTC (History)
7 users (show)

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


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 (tcohen) 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`.
Comment 3 Katrin Fischer 2023-01-25 22:53:49 UTC
The patch needs a little work, but I think this would still be nice to have. 

We could maybe add a note to the page to highlight the change?
Or a checkbox/option on the form, pre-checked, to include current loans.
Comment 4 Micah Bucy 2023-01-25 23:24:28 UTC
Alas, the library I was working on this for closed up not long after. I no longer have a system to make modifications to, so someone else will have to fix things up. 

Looks like the changes I proposed in the other patch I referenced were ultimately made in a more comprehensive fix to that particular problem, so whoever does at least shouldn't need to worry about that.

This was the only Perl experience I ever had, so that was fun. Hope someone else has fun building off this or coming up with a different solution.
Comment 5 Martin Renvoize (ashimema) 2023-01-26 10:00:38 UTC
Aw, that's such a shame we didn't manage to work this one through for you Micah.

I'll take a look at rebasing it for you and keeping the authorship, so you can get your name in the contributors list. :).