This report always returns double the number of rows requested
Created attachment 49760 [details] [review] Bug 16184 - Report bor_issues_top shows incorrect number of rows
Created attachment 49761 [details] before/after pic
A report with a LIMIT of 5 rows, will incorrectly return 10 rows (bad!)
I'm not sure whether this patch is the best way to do it. The whole query issues and old_issues via Perl seems like the wrong way to handle the logic. I'm sure a better SQL query could be built with a UNION that way the LIMIT and GROUP BY would be handled by MySQL instead.
Created attachment 49764 [details] [review] Bug 16184 - Report bor_issues_top shows incorrect number of rows TEST PLAN --------- 1) Have at least 6 patrons with checkouts and some checkins. 2) Reports -> Patrons with the most checkouts 3) Click 'Submit' (default is 5) -- more than 5 entries listed. 4) Apply patch 5) Refresh page -- only 5 entries listed. 6) Run koha qa test tools NOTE: While this works, I'd be much happier with a refactor as it would also speed up the report. See comment #5. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 49821 [details] [review] [PASSED QA] Bug 16184 - Report bor_issues_top shows incorrect number of rows TEST PLAN --------- 1) Have at least 6 patrons with checkouts and some checkins. 2) Reports -> Patrons with the most checkouts 3) Click 'Submit' (default is 5) -- more than 5 entries listed. 4) Apply patch 5) Refresh page -- only 5 entries listed. 6) Run koha qa test tools NOTE: While this works, I'd be much happier with a refactor as it would also speed up the report. See comment #5. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 Release. Thanks!
Patch pushed to 3.22.x, will be in 3.22.6
Pushed to 3.22.x, will be in 3.20.11.