[freeside-commits] branch master updated. cda55309d5e0444288968aaaa601a645f8738d94

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


The branch, master has been updated
       via  cda55309d5e0444288968aaaa601a645f8738d94 (commit)
      from  97c2b84e4a0ac12f203d7fa907e020d9ec784069 (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 cda55309d5e0444288968aaaa601a645f8738d94
Author: Mark Wells <mark at freeside.biz>
Date:   Wed Aug 21 14:28:06 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