projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97c2b84
)
safety guard for ScheduledResolve action
author
Mark Wells
<mark@freeside.biz>
Wed, 21 Aug 2013 21:28:06 +0000
(14:28 -0700)
committer
Mark Wells
<mark@freeside.biz>
Wed, 21 Aug 2013 21:28:06 +0000
(14:28 -0700)
rt/lib/RT/Action/ScheduledResolve.pm
patch
|
blob
|
history
diff --git
a/rt/lib/RT/Action/ScheduledResolve.pm
b/rt/lib/RT/Action/ScheduledResolve.pm
index
6b323cb
..
dafa91a
100644
(file)
--- 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 {