[rt-devel] AutoOpen If <status>

J. Sloan js138 at eng.cam.ac.uk
Thu Dec 11 13:27:21 EST 2003


This may be old hat, but I found this useful to do and can't see any harm
in it becoming the default.

This change allows 'Open If New' etc conditions to be trivially
created.

[Context - I want to 'On Owner Change' 'Open If New' - since if a reply
from RT AutoTakes the ticket (another local change) and resolves it the
simpler 'On Owner Change' 'Open' causes it to become reopened,
undesireably]

John

*** AutoOpen.pm.orig    2003-12-11 18:22:54.000000000 +0000
--- AutoOpen_Local.pm   2003-12-11 18:23:28.000000000 +0000
***************
*** 1,6 ****
--- 1,11 ----
+ # {{{ sub Prepare
  sub Prepare {
      my $self = shift;

+     # If passed an argument, don't autoopen unless status matches it.
+     my $arg = $self->Argument;
+     return unless ($arg && $self->TicketObj->Status eq $arg);
+
      # if the ticket is already open or the ticket is new and the message
is more mail from the
      # requestor, don't reopen it.

***************
*** 17,19 ****
--- 22,28 ----
  }

  1;
+     return (1);
+ }
+
+ 1;




More information about the Rt-devel mailing list