[freeside-commits] branch FREESIDE_3_BRANCH updated. 024f58c36ee546ea711de98a3c71902e907554e6

Mark Wells mark at 420.am
Wed Aug 21 14:28:25 PDT 2013


The branch, FREESIDE_3_BRANCH has been updated
       via  024f58c36ee546ea711de98a3c71902e907554e6 (commit)
      from  4ffd142dae5358de567d0d9cc07fd1be0b62f1be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 024f58c36ee546ea711de98a3c71902e907554e6
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Aug 21 14:27:56 2013 -0700

    safety guard for ScheduledResolve action

diff --git a/rt/lib/RT/Action/ScheduledResolve.pm b/rt/lib/RT/Action/ScheduledResolve.pm
index 6b323cb..dafa91a 100644
--- a/rt/lib/RT/Action/ScheduledResolve.pm
+++ b/rt/lib/RT/Action/ScheduledResolve.pm
@@ -20,7 +20,9 @@ sub Prepare {
       'deleted'
     ); # don't resolve from any of these states.
     my $time = $self->TicketObj->WillResolveObj->Unix;
-    return ( $time > 0 and $time < time() );
+    # resolve if the WillResolve date is set, and in the past,
+    # and less than a year old
+    return ( $time > 0 and $time < time() and (time() - $time) < 31536000 );
 }
 
 sub Commit {

-----------------------------------------------------------------------

Summary of changes:
 rt/lib/RT/Action/ScheduledResolve.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)




More information about the freeside-commits mailing list