This code seems to be unused now: if ( $borrower->{'category_type'} eq 'X' && ( $item->{barcode} )) { # stats only borrower -- add entry to statistics table, and return issuingimpossible{STATS} = 1 . &UpdateStats({ ... Why? The key category_type does not exist. Or perhaps does no longer exist. Perhaps it has been refactored to a Koha object hash or something ? The check itself refers to a column in the categories table that formerly got included in the borrower hash.
Found while testing 15438
This may have bad side-effects.
Created attachment 66997 [details] [review] Bug 19276: (bug 17829 follow-up) Fix Statistic patrons behaviour Bug 17829 must have been handle this specific case: GetMember set category_type, but now $borrower is a Koha::Patron unblessed and does not contain the category_type. The fix is to call ->category->category_type on the Koha::Patron object to be able to know if they are a statistic patrons. Test plan: Run the tests
Lowering the severity, it's not in stable releases
Created attachment 67028 [details] [review] Bug 19276: (bug 17829 follow-up) Fix Statistic patrons behaviour Bug 17829 must have been handle this specific case: GetMember set category_type, but now $borrower is a Koha::Patron unblessed and does not contain the category_type. The fix is to call ->category->category_type on the Koha::Patron object to be able to know if they are a statistic patrons. Test plan: Run the tests Tests pass, as does QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Created attachment 67445 [details] [review] Bug 19276: (bug 17829 follow-up) Fix Statistic patrons behaviour Bug 17829 must have been handle this specific case: GetMember set category_type, but now $borrower is a Koha::Patron unblessed and does not contain the category_type. The fix is to call ->category->category_type on the Koha::Patron object to be able to know if they are a statistic patrons. Test plan: Run the tests Tests pass, as does QA test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 17.11, thanks to everybody involved!
Created attachment 67491 [details] [review] Bug 19276: Update the number of tests
(In reply to Jonathan Druart from comment #8) > Created attachment 67491 [details] [review] [review] > Bug 19276: Update the number of tests Pushed to master!
Depends on Bug 17829 that is not in 17.05.x