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=bf71b847ceeb40020950c7b723119a4e574ce72f;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 Signed-off-by: Galen Charlton --- 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 6fa6d5b132..75835263a0 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -792,7 +792,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); @@ -809,7 +810,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); } @@ -3783,7 +3784,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 ||