Bug 36534: Batch operations when using limit in report
authorKatariina Pohto <trainee@koha-suomi.fi>
Thu, 2 May 2024 11:27:06 +0000 (14:27 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 24 May 2024 14:59:03 +0000 (16:59 +0200)
commite6beba64bc95219df8e07c1d9f635e6c41b576ff
tree07752d1295b4b191d8ce8031455ee84925eb2244
parent5ef97539838ede202bcf620b7ed99246c70c13ec
Bug 36534: Batch operations when using limit in report

When report results number exceeds the result per page limit, batch
operations link reads "Batch operations with (page limit) records" even
if there are more or less shown records (more when using limit in SQL or
less in the last page of result). This patch fixes the link text to
actual shown records.

To test:
1) Create a report of items with a limit of e.g., 26.
2) Run report.
3) See that number of results shown exceeds 20 but the link says "Batch
   operations with 20 visible records".
4) See that the second page shows 6 results but the link is still for 20
   records.
5) Apply patch.
6) Run report again.
7) See that the link texts will show correctly 26 records on the first
   page and 6 records on the second.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e9356afd9f7e8ee16165341b8009282ff9ab3ff3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt