Rt-users digest, Vol 1 #1143 - 12 msgs

Subject: Re: [rt-users] Automatically Open Tickets??
It would be very nice if scrips could run both before and after ticket
save. Then you could have a post-scrip that adjusts fields without
having to worry about getting your changes stomped on. Maybe this is
possible and I have just not been properly enlightened yet.

Mark
Mark, I am not sure if this is possible, but I added a scrip that does
this:
sub Commit {
my $self = shift;
$arg = $self->Argument;
my (@Requestors);
if ($arg =~ /\bRequestors\b/) {
push (@Requestors,
@{$self->TicketObj->Requestors->EmailAddress});
}
push (@Requestors, "theboss@here.com");
my ($Requestor);
$Requestor = join(",",@Requestors);
$self->TicketObj->AddRequestor(Email => $Requestor);
return $self;
}
I noticed odd behaviour when checking out the email the boss recieved
for tickets created with this scrip enabled. The first email he got was
AdminCC onCreate. The only requestor listed was the one input in the
WebUI. The second email he received was Requestor onCreate. This one
listed both the original WebUI requestor as well as the boss who was
added in the scrip.

I am not sure if this would be an example of pre and post processing.
But maybe?

Also, this is my first scrip. If anybody has any pointers please feel
free to email me off list. I can forward the full scrip if wanted.
Thanks!