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

Michael Bochynski mbochynski at audiumcorp.com
Wed Jul 27 14:27:48 EDT 2005


I have it working just fine, however I use several steps to actually
create the due date from bits and pieces. Users on the web form, outside
RT, can set up the date using drop down boxes. If you want, I can share
the scrip with you.

One thing i encountered, that if you choose the time to, let's say, 9pm
and month to November, it automatically changes the hour, based on the
daylight saving changes. Can I set it somewhere in RT, so it will not
apply daylight changes?

Additionally, I want to set up the Subject, however it seems that the
line
if( $content =~ m/^\QSet-Subject:\E\s*(\S+)\s*$/m ) {
	$some_var = $1;
}

doesn't work if in the email "Set-Subject: DATA" DATA has whitespaces. 
Is it the expression not working properly with whitespaces or something else?

Michael

On Wed, 2005-07-27 at 13:07 -0500, Ennis William McCaffrey wrote:
> 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
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> 



More information about the rt-users mailing list