LP#1692116 - Action trigger validator fix for paid Long Overdue items
authorMichele Morgan <mmorgan@noblenet.org>
Thu, 14 Sep 2017 15:48:31 +0000 (11:48 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 11 Jul 2018 15:09:36 +0000 (11:09 -0400)
Adds a check for a NULL xact_finish to the CircIsOpen validator. The
result is that overdue notification a/t events for Long Overdue items that
have been paid for, and the transaction closed, will be invalid.

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>

Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Validator.pm

index db909a5..1a53dfb 100644 (file)
@@ -18,6 +18,7 @@ sub CircIsOpen {
     my $env = shift;
 
     return 0 if (defined($env->{target}->checkin_time));
+    return 0 if (defined($env->{target}->xact_finish));
 
     if ($env->{params}->{min_target_age}) {
         $env->{params}->{target_age_field} = 'xact_start';