[rt-users] setting the Due Date upon ticket creation ... REVISITIED
Ennis William McCaffrey
ennis at mail.twcgb.net
Wed Jul 27 14:36:01 EDT 2005
Ruslan:
I've changed the Scrip to read as follows, but it still does not work.
Do I have the $AttachObj defined correctly here?
Custom action preparation code:
my $AttachObj = $self->TransactionObj->Attachments->First;
# go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {
return 1;
}
my $content = $AttachObj->Content;
if( $content =~ m/^\QSet-Start:\E\s*(\S+)\s*$/m ) {
$self->TicketObj->SetDue($1);
}
# strip special commands from email content
$content =~ s/^\QSet-Start:\E\s*(\S+)\s*$//gm;
# silently overwrite attachment content
$AttachObj->__Set( Field => 'Content', Value => $content );
1;
Ennis McCaffrey
Time Warner Cable
Digital Network Engineer
1001 West Kennedy Avenue
PO Box 145
Kimberly, WI 54136
(920) 831-9220 Office
(920) 378-0416 Cell
Ennis at Mail.TWCGB.NET
More information about the rt-users
mailing list