[rt-devel] AutoOpen If <status>

J. Sloan js138 at eng.cam.ac.uk
Fri Dec 12 03:59:22 EST 2003


On Thu, 11 Dec 2003, Robert Spier wrote:

>
> This part of the patch looks odd.  :)  Where's the open
> bracket for the close bracket?
>
> > ***************
> > *** 17,19 ****
> > --- 22,28 ----
> >   }
> >
> >   1;
> > +     return (1);
> > + }
> > +
> > + 1;

Um yes - deliberate mistake left as an exercise for the reader.  [Cut and
paste error

This should be cleaner:

***************
*** 1,6 ****
--- 1,11 ----
  sub Prepare {
      my $self = shift;

+
+     # If passed an argument, don't autoopen unless status matches it.
+     my $arg = $self->Argument;
+     return undef 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.

]

Caveat - because of the IsInbound in AutoOpen.pm, 'On Owner Change' 'Open
If New' doesn't work if the new owner is also the requestor.  Unlikely to
matter often, but may cause confusion.

John




More information about the Rt-devel mailing list