summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Action/SetWillResolve.pm
diff options
context:
space:
mode:
authormark <mark>2011-08-23 21:46:34 +0000
committermark <mark>2011-08-23 21:46:34 +0000
commitab8aef9ec21df4b149f39cd24c9c5f3542dd2e3e (patch)
treeceaa135796c9d158e12f8ce7b3c55ad4df2ab774 /rt/lib/RT/Action/SetWillResolve.pm
parentb431ece7b4a71aa5771f44393da582692f668817 (diff)
RT future ticket resolve, #13853
Diffstat (limited to 'rt/lib/RT/Action/SetWillResolve.pm')
-rw-r--r--rt/lib/RT/Action/SetWillResolve.pm27
1 files changed, 27 insertions, 0 deletions
diff --git a/rt/lib/RT/Action/SetWillResolve.pm b/rt/lib/RT/Action/SetWillResolve.pm
new file mode 100644
index 000000000..807b3c64c
--- /dev/null
+++ b/rt/lib/RT/Action/SetWillResolve.pm
@@ -0,0 +1,27 @@
+package RT::Action::SetWillResolve;
+use base 'RT::Action';
+
+use strict;
+
+sub Describe {
+ my $self = shift;
+ return (ref $self ." will set a ticket's future resolve date to the argument.");
+}
+
+sub Prepare {
+ return 1;
+}
+
+sub Commit {
+ my $self = shift;
+ my $DateObj = RT::Date->new( $self->CurrentUser );
+ $DateObj->Set(
+ Format => 'unknown',
+ Value => $self->Argument,
+ );
+ $self->TicketObj->SetWillResolve( $DateObj->ISO );
+}
+
+RT::Base->_ImportOverlays();
+
+1;