Bug 31594 - Report results count of shown can be incorrect on last page
Summary: Report results count of shown can be incorrect on last page
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Nick Clemens
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-21 14:14 UTC by Nick Clemens
Modified: 2023-06-08 22:32 UTC (History)
2 users (show)

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


Attachments
Bug 31594: Use ount of results for displaying number shown (1.42 KB, patch)
2022-09-21 14:18 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 31594: Use ount of results for displaying number shown (1.47 KB, patch)
2022-09-21 18:38 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31594: Use ount of results for displaying number shown (1.52 KB, patch)
2022-10-02 09:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31594: Use count of results for displaying number shown (1.58 KB, patch)
2022-10-03 13:07 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-09-21 14:14:26 UTC
When a report has more than 20 results, but not a multiple of twenty the final page can have 5 results say, but koha still says:
25 results (20 shown)

We should count the number of results for display of shown
Comment 1 Nick Clemens 2022-09-21 14:18:41 UTC
Created attachment 140821 [details] [review]
Bug 31594: Use ount of results for displaying number shown

To test:
1 - Create a report with a number of results that is not a multiple of 20
    SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)
Comment 2 Owen Leonard 2022-09-21 18:38:12 UTC
Created attachment 140827 [details] [review]
Bug 31594: Use ount of results for displaying number shown

To test:
1 - Create a report with a number of results that is not a multiple of 20
    SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2022-10-02 09:22:35 UTC
Created attachment 141203 [details] [review]
Bug 31594: Use ount of results for displaying number shown

To test:
1 - Create a report with a number of results that is not a multiple of 20
    SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2022-10-02 09:22:50 UTC
Small logical fix, nice enhancement - love :)
Comment 5 Tomás Cohen Arazi 2022-10-03 13:07:17 UTC
Created attachment 141262 [details] [review]
Bug 31594: Use count of results for displaying number shown

To test:
1 - Create a report with a number of results that is not a multiple of 20
    SELECT barcode FROM items
2 - Run the report
3 - Go to the final page
4 - Note report says 20 shown, but there are less
5 - Apply patch
6 - Reload and confirm correct number of shown is shown :-)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi 2022-10-03 13:10:14 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2022-12-05 15:54:49 UTC
Backported to 22.05.x for upcoming 22.05.08 release
Comment 8 Arthur Suzuki 2022-12-14 09:45:41 UTC
applied to 21.11 for 21.11.15