Bug 6099

Summary: pagination error on GROUP BY guided reports
Product: Koha Reporter: Paul Poulain <paul.poulain>
Component: ReportsAssignee: Paul Poulain <paul.poulain>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: P2 CC: chris, frederic.durand, jwagner, katrin.fischer, koha.sekjal
Version: 3.4   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 6340    
Bug Blocks:    
Attachments: proposed patch
Proposed patch
Proposed patch

Description Paul Poulain 2011-04-06 16:17:02 UTC
The calculation of length of report is wrong in case of a select with GROUP BY.
Comment 1 Paul Poulain 2011-04-06 16:21:57 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2011-04-07 10:02:17 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2011-04-07 14:10:56 UTC
Created attachment 3798 [details] [review]
Proposed patch

Replace stupid previous patch
Comment 4 Frederic Durand 2011-04-07 14:16:02 UTC
Count of row in reports with GROUP BY is ok.
Comment 5 Ian Walls 2011-04-07 14:19:28 UTC
Testing the most recent version of the attached patch, and it works.  Signed off patch sent to list.
Comment 6 Katrin Fischer 2011-04-07 15:13:17 UTC
*** Bug 3315 has been marked as a duplicate of this bug. ***
Comment 7 Chris Cormack 2011-04-08 00:18:47 UTC
Pushed, please test
Comment 8 Katrin Fischer 2011-05-14 10:16:52 UTC
I think the patch didn't fix the problem. The number of results shown is correct. But I get no pagination.

My test was:
select * from borrowers group by borrowernumber, categorycode

This makes not much sense, but gives a result list long enough to cause pagination.

After running the report I got:

Total number of rows matching the (unlimited) query is 50.

The first 20 results were shown, the following results not.
Comment 9 Katrin Fischer 2011-05-14 10:41:54 UTC
Pagination is broken in general on this page. Filing separate bug and sending patch.
Comment 10 Katrin Fischer 2012-02-01 16:45:33 UTC
This works nicely in 3.6.3. Marking resolved.