get next status & suppressed alerts working correctly
authorGalen Charlton <gmc@esilibrary.com>
Tue, 25 Oct 2016 16:53:32 +0000 (12:53 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 27 Mar 2017 20:35:50 +0000 (16:35 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 0e16a2b..37c9c25 100644 (file)
@@ -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);