[rt-users] setting the Due Date upon ticket creation ... REVISITIED

Ennis William McCaffrey ennis at mail.twcgb.net
Wed Jul 27 14:07:12 EDT 2005


RT version 3.4.1
MySQL version 4.1

I cannot set the due date of my ticket as explained in the wiki at:

     http://wiki.bestpractical.com/index.cgi?SetTicketPropertiesViaMail
     
Actually, I do not see the Scrip referenced in the RT log at all!

Would anybody be able to point me in the right direction?????

I have set up the scrip in my queue as follows:

Description: Set Due Date
Condition:   On Correspond
Action:      User Defined
Template:    Global Template: BLANK
Stage:       Transaction Create

Custom condition: (I have nothing here)

Custom action preparation code:
my $content = $AttachObj->Content;

my $AttachObj = $self->TransactionObj->Attachments->First;

# go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {
     return 1;
}

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;

Custom action cleanup code: (I also have nothing here)



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