[otrs-cvs] otrs/Kernel/Modules AgentTicketBounce.pm,1.13,1.14

cvs-log at otrs.org cvs-log at otrs.org
Tue Apr 1 20:35:35 GMT 2008


Comments:
Update of /home/cvs/otrs/Kernel/Modules
In directory lancelot:/tmp/cvs-serv4728/Kernel/Modules

Modified Files:
	AgentTicketBounce.pm 
Log Message:
Fixed bug# 2822 - Ticket Number in subject and body of Bounce Notification to customer/sender is not shown.

Author: martin

Index: AgentTicketBounce.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/AgentTicketBounce.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** AgentTicketBounce.pm	31 Jan 2008 06:22:12 -0000	1.13
--- AgentTicketBounce.pm	1 Apr 2008 20:35:29 -0000	1.14
***************
*** 141,145 ****
          # prepare subject ...
          $Article{Subject} = $Self->{TicketObject}->TicketSubjectBuild(
!             TicketNumber => $Param{TicketNumber},
              Subject      => $Article{Subject} || '',
          );
--- 141,145 ----
          # prepare subject ...
          $Article{Subject} = $Self->{TicketObject}->TicketSubjectBuild(
!             TicketNumber => $Article{TicketNumber},
              Subject      => $Article{Subject} || '',
          );
***************
*** 156,161 ****
          my %Customer = ();
          if ( $Ticket{CustomerUserID} ) {
!             %Customer = $Self->{CustomerUserObject}
!                 ->CustomerUserDataGet( User => $Ticket{CustomerUserID}, );
          }
  
--- 156,162 ----
          my %Customer = ();
          if ( $Ticket{CustomerUserID} ) {
!             %Customer = $Self->{CustomerUserObject}->CustomerUserDataGet(
!                 User => $Ticket{CustomerUserID},
!             );
          }
  
***************
*** 171,176 ****
                  my $From = '';
                  if ( $Ticket{CustomerUserID} ) {
!                     $From = $Self->{CustomerUserObject}
!                         ->CustomerName( UserLogin => $Ticket{CustomerUserID} );
                  }
                  if ( !$From ) {
--- 172,178 ----
                  my $From = '';
                  if ( $Ticket{CustomerUserID} ) {
!                     $From = $Self->{CustomerUserObject}->CustomerName(
!                         UserLogin => $Ticket{CustomerUserID},
!                     );
                  }
                  if ( !$From ) {
***************
*** 321,326 ****
                  # error page
                  return $Self->{LayoutObject}->ErrorScreen(
!                     Message =>
!                         "Can't forward ticket to $Address! It's a local address! You need to move it!",
                      Comment => 'Please contact the admin.',
                  );
--- 323,327 ----
                  # error page
                  return $Self->{LayoutObject}->ErrorScreen(
!                     Message => "Can't forward ticket to $Address! It's a local address! You need to move it!",
                      Comment => 'Please contact the admin.',
                  );
***************
*** 333,349 ****
          $Param{Email}      = $Address{Email};
          $Param{EmailPlain} = $Self->{TicketObject}->ArticlePlain( ArticleID => $Self->{ArticleID} );
!         if (!$Self->{TicketObject}->ArticleBounce(
!                 TicketID    => $Self->{TicketID},
!                 ArticleID   => $Self->{ArticleID},
!                 UserID      => $Self->{UserID},
!                 To          => $Param{BounceTo},
!                 From        => $Param{Email},
!                 Email       => $Param{EmailPlain},
!                 HistoryType => 'Bounce',
!             )
!             )
!         {
  
!             # error page
              return $Self->{LayoutObject}->ErrorScreen(
                  Message => "Can't bounce email!",
--- 334,349 ----
          $Param{Email}      = $Address{Email};
          $Param{EmailPlain} = $Self->{TicketObject}->ArticlePlain( ArticleID => $Self->{ArticleID} );
!         my $Bounce = $Self->{TicketObject}->ArticleBounce(
!             TicketID    => $Self->{TicketID},
!             ArticleID   => $Self->{ArticleID},
!             UserID      => $Self->{UserID},
!             To          => $Param{BounceTo},
!             From        => $Param{Email},
!             Email       => $Param{EmailPlain},
!             HistoryType => 'Bounce',
!         );
  
!         # error page
!         if ( !$Bounce ) {
              return $Self->{LayoutObject}->ErrorScreen(
                  Message => "Can't bounce email!",
***************
*** 354,382 ****
          # send customer info?
          if ( $Param{InformSender} ) {
!             $Param{Body} =~ s/<OTRS_TICKET>/$Param{TicketNumber}/g;
              $Param{Body} =~ s/<OTRS_BOUNCE_TO>/$Param{BounceTo}/g;
!             if (my $ArticleID = $Self->{TicketObject}->ArticleSend(
!                     ArticleType    => 'email-external',
!                     SenderType     => 'agent',
!                     TicketID       => $Self->{TicketID},
!                     HistoryType    => 'Bounce',
!                     HistoryComment => "Bounced info to '$Param{To}'.",
!                     From           => $Param{From},
!                     Email          => $Param{Email},
!                     To             => $Param{To},
!                     Subject        => $Param{Subject},
!                     UserID         => $Self->{UserID},
!                     Body           => $Param{Body},
!                     Charset        => $Self->{LayoutObject}->{UserCharset},
!                     Type           => 'text/plain',
!                 )
!                 )
!             {
! 
!                 # null
!             }
!             else {
  
!                 # error page
                  return $Self->{LayoutObject}->ErrorScreen(
                      Message => "Can't send email!",
--- 354,377 ----
          # send customer info?
          if ( $Param{InformSender} ) {
!             $Param{Body} =~ s/<OTRS_TICKET>/$Ticket{TicketNumber}/g;
              $Param{Body} =~ s/<OTRS_BOUNCE_TO>/$Param{BounceTo}/g;
!             my $ArticleID = $Self->{TicketObject}->ArticleSend(
!                 ArticleType    => 'email-external',
!                 SenderType     => 'agent',
!                 TicketID       => $Self->{TicketID},
!                 HistoryType    => 'Bounce',
!                 HistoryComment => "Bounced info to '$Param{To}'.",
!                 From           => $Param{From},
!                 Email          => $Param{Email},
!                 To             => $Param{To},
!                 Subject        => $Param{Subject},
!                 UserID         => $Self->{UserID},
!                 Body           => $Param{Body},
!                 Charset        => $Self->{LayoutObject}->{UserCharset},
!                 Type           => 'text/plain',
!             );
  
!             # error page
!             if ( !$ArticleID ) {
                  return $Self->{LayoutObject}->ErrorScreen(
                      Message => "Can't send email!",
***************
*** 387,392 ****
  
          # set state
!         my %StateData
!             = $Self->{TicketObject}->{StateObject}->StateGet( ID => $Param{BounceStateID}, );
          $Self->{TicketObject}->StateSet(
              TicketID  => $Self->{TicketID},
--- 382,388 ----
  
          # set state
!         my %StateData = $Self->{TicketObject}->{StateObject}->StateGet(
!             ID => $Param{BounceStateID},
!         );
          $Self->{TicketObject}->StateSet(
              TicketID  => $Self->{TicketID},


More information about the cvs-log mailing list