summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Action
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-08-21 14:27:56 -0700
committerMark Wells <mark@freeside.biz>2013-08-21 14:27:56 -0700
commit024f58c36ee546ea711de98a3c71902e907554e6 (patch)
tree1d24ea554554d823a7b121a6f955ea950c198b5c /rt/lib/RT/Action
parent4ffd142dae5358de567d0d9cc07fd1be0b62f1be (diff)
safety guard for ScheduledResolve action
Diffstat (limited to 'rt/lib/RT/Action')
-rw-r--r--rt/lib/RT/Action/ScheduledResolve.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/rt/lib/RT/Action/ScheduledResolve.pm b/rt/lib/RT/Action/ScheduledResolve.pm
index 6b323cb6f..dafa91a40 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 {