From 5e0c9b31d6eb286ecd1614dc26519356fdeca236 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Wed, 15 Jun 2016 12:25:24 -0400 Subject: [PATCH] LP#1592891: Fix SIP2 standing penalty failures Update too_many_overdue and excessive_fines in OpenILS::SIP::Patron to account for the fact that the user object in this context no longer contains an array of ausp objects, but just an array of ausp IDs. This fixes SIP2 failures with patron information messages when a patron has one or more blocking penalties that are not otherwise ignored. Signed-off-by: Jeff Godin Signed-off-by: Galen Charlton --- Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm index 130d9bfcfa..ad64b61b3c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm @@ -17,6 +17,7 @@ use Digest::MD5 qw(md5_hex); use OpenILS::SIP; use OpenILS::Application::AppUtils; use OpenILS::Application::Actor; +use OpenILS::Const qw/:const/; use OpenSRF::Utils qw/:datetime/; use DateTime::Format::ISO8601; my $U = 'OpenILS::Application::AppUtils'; @@ -447,7 +448,7 @@ sub too_many_charged { # not implemented sub too_many_overdue { my $self = shift; return scalar( # PATRON_EXCEEDS_OVERDUE_COUNT - grep { $_->standing_penalty == 2 } @{$self->{user}->standing_penalties} + grep { $_ == OILS_PENALTY_PATRON_EXCEEDS_OVERDUE_COUNT } @{$self->{user}->standing_penalties} ); } @@ -472,7 +473,7 @@ sub too_many_lost { sub excessive_fines { my $self = shift; return scalar( # PATRON_EXCEEDS_FINES - grep { $_->standing_penalty == 1 } @{$self->{user}->standing_penalties} + grep { $_ == OILS_PENALTY_PATRON_EXCEEDS_FINES } @{$self->{user}->standing_penalties} ); } -- 2.43.2