From: Mike Rylander Date: Thu, 7 Apr 2016 18:50:23 +0000 (-0400) Subject: Array-ify next_status when sending back to client; Skip old-style status events when... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bef0b89d6506e474139151122f9198589783d279;p=working%2FEvergreen.git Array-ify next_status when sending back to client; Skip old-style status events when using new-style alert infrastructure. Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm index 031fdd8198..d511b57e26 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -782,7 +782,8 @@ sub generate_system_copy_alerts { my @alerts; foreach my $t (@final_types) { - $t->next_status([$U->unique_unnested_numbers($t->next_status)]); + $t->next_status([$U->unique_unnested_numbers($t->next_status)]) + if ($t->next_status); my $alert = new Fieldmapper::asset::copy_alert (); $alert->alert_type($t->id); @@ -799,7 +800,7 @@ sub generate_system_copy_alerts { $alert->alert_type($t->clone); - push(@{$self->next_copy_status}, $t->next_status) if ($t->next_status); + push(@{$self->next_copy_status}, @{$t->next_status}) if ($t->next_status); push(@alerts, $alert) unless (grep {$_->alert_type == $t->id} @$suppressions); } @@ -3773,7 +3774,8 @@ sub check_checkin_copy_status { my $status = $U->copy_status($copy->status)->id; return undef - if( $status == OILS_COPY_STATUS_AVAILABLE || + if( $self->new_copy_alerts || + $status == OILS_COPY_STATUS_AVAILABLE || $status == OILS_COPY_STATUS_CHECKED_OUT || $status == OILS_COPY_STATUS_IN_PROCESS || $status == OILS_COPY_STATUS_ON_HOLDS_SHELF ||