don't generate system copy alerts if copy state is normal
authorGalen Charlton <gmc@esilibrary.com>
Thu, 3 Dec 2015 19:52:13 +0000 (14:52 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Fri, 3 Nov 2017 20:00:38 +0000 (16:00 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index ea66588..49c4175 100644 (file)
@@ -724,6 +724,14 @@ sub generate_system_copy_alerts {
     my $self = shift;
     return unless($self->copy);
 
+    # don't create system copy alerts if the copy
+    # is in a normal state; we're assuming that there's
+    # never a need to generate a popup for each and every
+    # checkin or checkout of normal items. If this assumption
+    # proves false, then we'll need to add a way to explicitly specify
+    # that a copy alert type should never generate a system copy alert
+    return if $self->copy_state eq 'NORMAL';
+
     my $e = $self->editor;
 
     my $suppress_orgs = $U->get_org_descendants($self->circ_lib);