Koha-clms/reports
Baptiste Wojtkowski cb534eb7d3
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>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-16 17:05:12 +00:00
..
acquisitions_stats.pl Bug 42360: Move separator validation to C4::Context::csv_delimiter 2026-07-13 15:46:31 +00:00
bor_issues_top.pl Bug 42369: Use C4::Context::csv_delimiter for delimiter validation 2026-07-13 15:46:37 +00:00
borrowers_out.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
borrowers_stats.pl Bug 40287: Fix untranslatable strings in more statistics wizards 2025-12-17 13:24:31 -07:00
cash_register_stats.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cat_issues_top.pl Bug 8127: Fix filters use in 'Most-circulated items report' 2026-07-16 17:05:12 +00:00
catalog_by_itemtype.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
catalogue_out.pl Bug 42803: Only perform the lookups when !$filter is true 2026-06-19 15:39:00 +00:00
catalogue_stats.pl Bug 42363: Use C4::Context::csv_delimiter for delimiter validation 2026-07-13 15:46:33 +00:00
dictionary.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
guided_reports.pl Bug 38621: Use GetPreparedLetter for report templates 2026-06-29 15:39:08 +00:00
issues_avg_stats.pl Bug 42368: Use C4::Context::csv_delimiter for delimiter validation 2026-07-13 15:46:35 +00:00
issues_stats.pl Bug 42735: Fix SQL injection 2026-07-13 15:46:38 +00:00
itemslost.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
orders_by_fund.pl Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
reports-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reserves_stats.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials_stats.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00