From: Jeff Godin Date: Wed, 15 Jun 2016 16:25:24 +0000 (-0400) Subject: LP#1592891: Fix SIP2 standing penalty failures X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5e0c9b31d6eb286ecd1614dc26519356fdeca236;p=evergreen%2Fmasslnc.git 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 --- 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} ); }