[rt-commit] [svn] r550 - rt/branches/rt-3.1/lib/RT/Action
leira at fsck.com
leira at fsck.com
Thu Mar 11 13:49:31 EST 2004
Author: leira
Date: Thu Mar 11 13:49:31 2004
New Revision: 550
Modified:
rt/branches/rt-3.1/lib/RT/Action/CreateTickets.pm
Log:
Include content properly when creating tickets from templates.
Modified: rt/branches/rt-3.1/lib/RT/Action/CreateTickets.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Action/CreateTickets.pm (original)
+++ rt/branches/rt-3.1/lib/RT/Action/CreateTickets.pm Thu Mar 11 13:49:31 2004
@@ -361,7 +361,7 @@
my (@links, @postponed);
foreach my $template_id ( @{ $self->{'create_tickets'} } ) {
$T::Tickets{'TOP'} = $T::TOP = $top if $top;
- $RT::Logger->debug("Workflow: processing $template_id of $T::TOP");
+ $RT::Logger->debug("Workflow: processing $template_id of $T::TOP") if $T::TOP;
$T::ID = $template_id;
@T::AllID = @{ $self->{'create_tickets'} };
@@ -516,6 +516,7 @@
my $template_id;
foreach my $line (split(/\n/, $content)) {
$line =~ s/\r$//;
+ $RT::Logger->debug("Line: $line");
if ($line =~ /^===Create-Ticket: (.*)$/) {
$template_id = "create-$1";
$RT::Logger->debug("**** Create ticket: $template_id");
@@ -575,8 +576,6 @@
my $tag = lc ($1);
$tag =~ s/-//g;
- $value =~ s/\r$// if $value;
-
if (ref($args{$tag})) { #If it's an array, we want to push the value
push @{$args{$tag}}, $value;
}
@@ -634,15 +633,12 @@
);
my $content = $args{'content'};
- $content =~ s/\s//g;
- $content =~ s/\S//g;
- $content =~ s/\r//g;
if ($content) {
my $mimeobj = MIME::Entity->new();
$mimeobj->build(Type => $args{'contenttype'},
Data => $args{'content'});
$ticketargs{MIMEObj} = $mimeobj;
- $ticketargs{UpdateType} = $args{'updatetype'},
+ $ticketargs{UpdateType} = $args{'updatetype'} if $args{'updatetype'};
}
foreach my $key (keys(%args)) {
More information about the Rt-commit
mailing list