[Rt-commit] r10357 - in rt/branches/3.6-EXPERIMENTAL-ABERDEEN: lib/RT/Action lib/RT/Extension

audreyt at bestpractical.com audreyt at bestpractical.com
Tue Jan 15 15:16:53 EST 2008


Author: audreyt
Date: Tue Jan 15 15:16:52 2008
New Revision: 10357

Modified:
   rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Admin/RuleManager/Modify.html
   rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm
   rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Extension/RuleManager.pm

Log:
* Add SetStatus as one of the RuleManager actions.

Modified: rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Admin/RuleManager/Modify.html
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Admin/RuleManager/Modify.html	(original)
+++ rt/branches/3.6-EXPERIMENTAL-ABERDEEN/html/Admin/RuleManager/Modify.html	Tue Jan 15 15:16:52 2008
@@ -115,6 +115,8 @@
 <& /Elements/SelectQueue, Name => 'Argument', Default => $default, ShowNullOption => 1 &>
 % } elsif ($1 eq 'user') {
 <& /Elements/SelectOwner, Name => 'Argument', Default => $default, DefaultValue => 1, QueueObj => $QueueObj &>
+% } elsif ($1 eq 'status') {
+<& /Elements/SelectStatus, Name => 'Argument', Default => $default, DefaultValue => 1 &>
 % } else {
 <input name="Argument" value="<% $default %>" />
 % }

Modified: rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm	(original)
+++ rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Action/RuleManager.pm	Tue Jan 15 15:16:52 2008
@@ -126,6 +126,9 @@
         elsif ($handler eq 'Move the ticket to this queue:') {
             $self->TicketObj->SetQueue($rule->Argument);
         }
+        elsif ($handler eq "Change the ticket to this status:") {
+            $self->TicketObj->SetStatus($rule->Argument);
+        }
         elsif ($handler eq 'Send the autoreply in this template:') {
             local $self->{TemplateObj} = bless {
                 user    => $self->CurrentUser,

Modified: rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Extension/RuleManager.pm
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Extension/RuleManager.pm	(original)
+++ rt/branches/3.6-EXPERIMENTAL-ABERDEEN/lib/RT/Extension/RuleManager.pm	Tue Jan 15 15:16:52 2008
@@ -15,6 +15,7 @@
     'Send the autoreply in this template:', # loc
     "Set the ticket's owner as this user:", # loc
     'Move the ticket to this queue:',       # loc
+    'Change the ticket to this status:',    # loc
 );
 
 sub new {
@@ -243,6 +244,9 @@
             $queue->Load($self->Argument);
             return $queue->Name;
         }
+        elsif ($1 eq 'status') {
+            return $self->Argument; # XXX - loc()
+        }
         else {
             return $self->Argument;
         }


More information about the Rt-commit mailing list