Koha/reports
Michael Hafen 212294b7f1
Bug 36585: Improve 'Patrons with the most checkouts' report
Update the 'Patrons with the most checkouts' report (bor_issues_top.pl)
to:
1. Add the total to the CSV output.
2. Change the screen output to only show the patrons name once, instead
   of for each group by column.
3. Add total check out when output to screen.
4. Change item type group by from biblioitems.itemtype to items.itype.

Note: This does not fix the SQL query so that it can run if the
database is in strict mode.

Test plan:
1. If using koha-testing-docker (KTD), set strict SQL mode for your
   database to 0 (that is, turn it off).
   (Edit <strict_sql_modes>0</strict_sql_modes> in
   /etc/koha/sites/kohadev/koha-conf.xml
   (and then flush_memcached and restart_all))
2. Add some data so that a useful report can be generated:
   . Check out and return some items to different patrons in different
     libraries:
     ==> Minimum end result:
         . two items issued to a patron for one library, 1 item issued
           and returned for the same patron at another library
         . one item issued to another patron from another patron
           category for one of the libraries used previously
3. Generate the report with output to screen with a group by, for
   example: 'By' option set to Category code
4. Observe that the patron name is repeated for each column group.
5. Observe that there is no total column.
6. Generate the report with output to CSV.
7. Observe that the total checkouts is not in the CSV.
8. Apply the patch and restart Koha (restart_all).
9. Generate the CSV report again.
10. Observe that the total checkouts is in the CSV.
11. Generate the report to screen again.
12. Observe that there is a total column and the patron name is only
    shown in one column.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-16 17:40:45 +01:00
..
acquisitions_stats.pl Bug 19097: Remove wantarray from GetMarcSubfieldStructureFromKohaField 2024-04-29 09:35:46 +02:00
bor_issues_top.pl Bug 36585: Improve 'Patrons with the most checkouts' report 2025-01-16 17:40:45 +01: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 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00
catalog_by_itemtype.pl Bug 31988: Remove reports/itemtypes.plugin 2024-03-18 18:03:39 +01:00
catalogue_out.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00
catalogue_stats.pl Bug 19097: Remove wantarray from GetMarcSubfieldStructureFromKohaField 2024-04-29 09:35:46 +02:00
dictionary.pl Bug 34478: Add op to reports/dictionary 2024-03-01 10:58:13 +01:00
guided_reports.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
issues_avg_stats.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01:00
issues_stats.pl Bug 34478: op =~ ^cud- - Manual - cud-do_it => do_it 2024-03-01 10:58:32 +01: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 28327: Unify CSV delimiter special behavior for tabulation 2022-08-19 15:53:12 -03: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