From: Galen Charlton Date: Tue, 25 Oct 2016 16:53:32 +0000 (-0400) Subject: get next status & suppressed alerts working correctly X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a8694e456a7a6ddd0f44a5860e85bf4dc49e645e;p=working%2FEvergreen.git get next status & suppressed alerts working correctly 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 0e16a2bde6..37c9c25f37 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm @@ -801,9 +801,13 @@ sub generate_system_copy_alerts { # certain old-style-events my %auto_override_conditions = (); foreach my $t (@final_types) { - $t->next_status([$U->unique_unnested_numbers($t->next_status)]) - if ($t->next_status) && - !(grep {$t->id} @$suppressions); + if ($t->next_status) { + if (grep { $t->id == $_->alert_type } @$suppressions) { + $t->next_status([]); + } else { + $t->next_status([$U->unique_unnested_numbers($t->next_status)]); + } + } my $alert = new Fieldmapper::asset::copy_alert (); $alert->alert_type($t->id);