]> git.koha-community.org Git - koha.git/commit
Bug 7021: Patron category in the statistics table
authorOlli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Wed, 2 Jul 2014 16:54:33 +0000 (19:54 +0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 22 Sep 2022 12:31:27 +0000 (09:31 -0300)
commitb9158641d4573ff547e1a6df021ca3187aa10da8
treeb8be8cb875fa1192c9ba07e3389adef30757c720
parentcbed9618c993dbe19e391a9d12136228d5d3f949
Bug 7021: Patron category in the statistics table

This patch populates the koha.statistics.usercode with borrowers.categorycode where it is easily available.
Currently for statistics.type 'issue' OR 'localuse' OR 'renew'.

Supplied a script to UPDATE the old statistics records.

Have fun!

To test:
1. Add loan for patron.
2. Check statistics table
=> 'usercode' column for this issue should now contain patrons categorycode

To test add_statistics_borrowers_categorycode.pl:
1. Run add_statistics_borrowers_categorycode.pl
2. Check statistics table
=> all statistics which are type 'issue' OR 'localuse' OR 'renew'
should now contain patrons categorycode in 'usercode' column

Also prove that tests in t/db_dependent/Circulation.t still pass.

Rebased-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/Circulation.pm
C4/Stats.pm
installer/data/mysql/kohastructure.sql