Koha-clms/reports
Baptiste Wojtkowski 855c42b3d2
Bug 8127: Fix filters use in 'Most-circulated items report'
Filters are broken for many reasons. Previous patch contains some
(little) tidying.
There are 3 parts in this patch:
1 - The column name is incorrectly named in the dropdown for "branch",
  it is added in this patch
2 - There is a definition for 'Day' and 'Month', but not for 'Week', it
is also added in this patch
3 - Dbh variables are passed in the string definition AND in the call. I
removed them from the string definition since it violates the coding
guidelines.

Test plan:

1. On an fresh ktd db, run the script provided here (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8127#c3)  to fill the database with checkins/checkouts:

Visit http://your_koha:8081/cgi-bin/koha/reports/cat_issues_top.pl
2. Run a baseline test with following params:
Checkout date from 01/01/2020
Checkout date to: tomorrow
Library: Any library
Fill nothing else

Notice it is works

3. Test with some limits (Library, Week, and any other), notice you encounter errors on Library and Week, and that any other is empty, without error.

4. Apply patch
5. Rerun 2-3 and notice you now have results. Check with each possible limit, limiting to 5. Test once with 10 as a limit.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2b78fd1de0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2026-08-14 14:25:20 +02:00
..
acquisitions_stats.pl Bug 42360: [24.11] Move separator validation to C4::Context::csv_delimiter 2026-06-18 15:50:38 +02:00
bor_issues_top.pl Bug 42369: [24.11] Use C4::Context::csv_delimiter for delimiter validation 2026-06-18 15:50:41 +02:00
borrowers_out.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00
borrowers_stats.pl Bug 36380: Add filter value on patron statistics report summary 2024-05-10 15:19:11 +02:00
cash_register_stats.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
cat_issues_top.pl Bug 8127: Fix filters use in 'Most-circulated items report' 2026-08-14 14:25:20 +02:00
catalog_by_itemtype.pl Bug 31988: Remove reports/itemtypes.plugin 2024-03-18 18:03:39 +01:00
catalogue_out.pl Bug 42361: Fix SQL injection in catalogue_out.pl 2026-05-28 10:12:20 +00:00
catalogue_stats.pl Bug 42363: [24.11] Use C4::Context::csv_delimiter for delimiter validation 2026-06-18 15:50:39 +02:00
dictionary.pl Bug 37784: (QA follow-up) Bail out to new definition 2025-03-24 17:59:10 +01:00
guided_reports.pl Bug 38414: [24.11.x] Fix permission controller-side 2026-05-28 10:09:20 +00:00
issues_avg_stats.pl Bug 42368: [24.11] Use C4::Context::csv_delimiter for delimiter validation 2026-06-18 15:50:40 +02:00
issues_stats.pl Bug 42735: [24.11] Fix SQL injection 2026-06-18 15:50:41 +02:00
itemslost.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
orders_by_fund.pl Bug 40419: Fix wrong license 2025-08-01 14:50:29 +02:00
reports-home.pl Bug 34859: Remove unnecessary params from reports-home.pl 2023-10-04 16:40:16 -04:00
reserves_stats.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00
serials_stats.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00