[otrs-cvs] CVS: otrs/Kernel/System/PostMaster FollowUp.pm, 1.46, 1.47 NewTicket.pm,1.56,1.57 Reject.pm,1.5,1.6

cvs-log at otrs.org cvs-log at otrs.org
Thu Nov 2 14:02:07 CET 2006


Update of /home/cvs/otrs/Kernel/System/PostMaster
In directory lancelot:/tmp/cvs-serv14062/Kernel/System/PostMaster

Modified Files:
	FollowUp.pm NewTicket.pm Reject.pm 
Log Message:
removed # --

Index: FollowUp.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/FollowUp.pm,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** FollowUp.pm	31 Oct 2006 15:26:53 -0000	1.46
--- FollowUp.pm	2 Nov 2006 13:02:04 -0000	1.47
***************
*** 19,23 ****
  $VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
  
- # --
  sub new {
      my $Type = shift;
--- 19,22 ----
***************
*** 43,58 ****
      return $Self;
  }
! # --
  sub Run {
      my $Self = shift;
      my %Param = @_;
!     # --
      # check needed stuff
-     # --
      foreach (qw(TicketID InmailUserID GetParam Tn AutoResponseType)) {
!       if (!$Param{$_}) {
!         $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
!         return;
!       }
      }
      my %GetParam = %{$Param{GetParam}};
--- 42,56 ----
      return $Self;
  }
! 
  sub Run {
      my $Self = shift;
      my %Param = @_;
! 
      # check needed stuff
      foreach (qw(TicketID InmailUserID GetParam Tn AutoResponseType)) {
!         if (!$Param{$_}) {
!             $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
!             return;
!         }
      }
      my %GetParam = %{$Param{GetParam}};
***************
*** 238,241 ****
      return 1;
  }
! # --
  1;
--- 236,239 ----
      return 1;
  }
! 
  1;

Index: NewTicket.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/NewTicket.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** NewTicket.pm	29 Aug 2006 17:27:30 -0000	1.56
--- NewTicket.pm	2 Nov 2006 13:02:04 -0000	1.57
***************
*** 20,24 ****
  $VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
  
- # --
  sub new {
      my $Type = shift;
--- 20,23 ----
***************
*** 40,81 ****
      return $Self;
  }
! # --
  sub Run {
      my $Self = shift;
      my %Param = @_;
!     # --
      # check needed stuff
-     # --
      foreach (qw(InmailUserID GetParam)) {
!       if (!$Param{$_}) {
!         $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
!         return;
!       }
      }
      my %GetParam = %{$Param{GetParam}};
      my $Comment = $Param{Comment} || '';
      my $AutoResponseType = $Param{AutoResponseType} || '';
!     # --
      # get queue id and name
-     # --
      my $QueueID = $Param{QueueID} || die "need QueueID!";
      my $Queue = $Self->{QueueObject}->QueueLookup(QueueID => $QueueID);
!     # --
      # get state
-     # --
      my $State = $Self->{ConfigObject}->Get('PostmasterDefaultState') || 'new';
      if ($GetParam{'X-OTRS-State'}) {
          $State = $GetParam{'X-OTRS-State'};
      }
!     # --
      # get priority
-     # --
      my $Priority = $Self->{ConfigObject}->Get('PostmasterDefaultPriority') || '3 normal';
      if ($GetParam{'X-OTRS-Priority'}) {
          $Priority = $GetParam{'X-OTRS-Priority'};
      }
!     # --
      # get sender email
-     # --
      my @EmailAddresses = $Self->{ParseObject}->SplitAddressLine(
          Line => $GetParam{From},
--- 39,75 ----
      return $Self;
  }
! 
  sub Run {
      my $Self = shift;
      my %Param = @_;
! 
      # check needed stuff
      foreach (qw(InmailUserID GetParam)) {
!         if (!$Param{$_}) {
!             $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
!             return;
!         }
      }
      my %GetParam = %{$Param{GetParam}};
      my $Comment = $Param{Comment} || '';
      my $AutoResponseType = $Param{AutoResponseType} || '';
! 
      # get queue id and name
      my $QueueID = $Param{QueueID} || die "need QueueID!";
      my $Queue = $Self->{QueueObject}->QueueLookup(QueueID => $QueueID);
! 
      # get state
      my $State = $Self->{ConfigObject}->Get('PostmasterDefaultState') || 'new';
      if ($GetParam{'X-OTRS-State'}) {
          $State = $GetParam{'X-OTRS-State'};
      }
! 
      # get priority
      my $Priority = $Self->{ConfigObject}->Get('PostmasterDefaultPriority') || '3 normal';
      if ($GetParam{'X-OTRS-Priority'}) {
          $Priority = $GetParam{'X-OTRS-Priority'};
      }
! 
      # get sender email
      my @EmailAddresses = $Self->{ParseObject}->SplitAddressLine(
          Line => $GetParam{From},
***************
*** 86,92 ****
          );
      }
!     # --
      # get customer id (sender email) if there is no customer id given
-     # --
      if (!$GetParam{'X-OTRS-CustomerNo'} && $GetParam{'X-OTRS-CustomerUser'}) {
          # get customer user data form X-OTRS-CustomerUser
--- 80,85 ----
          );
      }
! 
      # get customer id (sender email) if there is no customer id given
      if (!$GetParam{'X-OTRS-CustomerNo'} && $GetParam{'X-OTRS-CustomerUser'}) {
          # get customer user data form X-OTRS-CustomerUser
***************
*** 98,104 ****
          }
      }
!     # --
      # get customer user data form From: (sender address)
!     # --
      if (!$GetParam{'X-OTRS-CustomerUser'}) {
          my %CustomerData = ();
--- 91,97 ----
          }
      }
! 
      # get customer user data form From: (sender address)
! 
      if (!$GetParam{'X-OTRS-CustomerUser'}) {
          my %CustomerData = ();
***************
*** 141,163 ****
          }
      }
!     # --
      # if there is no customer id found!
-     # --
      if (!$GetParam{'X-OTRS-CustomerNo'}) {
          $GetParam{'X-OTRS-CustomerNo'} = $GetParam{'SenderEmailAddress'};
      }
!     # --
      # if there is no customer user found!
-     # --
      if (!$GetParam{'X-OTRS-CustomerUser'}) {
          $GetParam{'X-OTRS-CustomerUser'} = $GetParam{'SenderEmailAddress'};
      }
!     # --
      # create new ticket
!     # --
      my $NewTn = $Self->{TicketObject}->CreateTicketNr();
!     # --
      # do db insert
-     # --
      my $TicketID = $Self->{TicketObject}->TicketCreate(
          TN => $NewTn,
--- 134,153 ----
          }
      }
! 
      # if there is no customer id found!
      if (!$GetParam{'X-OTRS-CustomerNo'}) {
          $GetParam{'X-OTRS-CustomerNo'} = $GetParam{'SenderEmailAddress'};
      }
! 
      # if there is no customer user found!
      if (!$GetParam{'X-OTRS-CustomerUser'}) {
          $GetParam{'X-OTRS-CustomerUser'} = $GetParam{'SenderEmailAddress'};
      }
! 
      # create new ticket
! 
      my $NewTn = $Self->{TicketObject}->CreateTicketNr();
! 
      # do db insert
      my $TicketID = $Self->{TicketObject}->TicketCreate(
          TN => $NewTn,
***************
*** 185,191 ****
          print "CustomerUser: $GetParam{'X-OTRS-CustomerUser'}\n";
      }
!     # --
      # set free ticket text
-     # --
      my @Values = ('X-OTRS-TicketKey', 'X-OTRS-TicketValue');
      my $CounterTmp = 0;
--- 175,180 ----
          print "CustomerUser: $GetParam{'X-OTRS-CustomerUser'}\n";
      }
! 
      # set free ticket text
      my @Values = ('X-OTRS-TicketKey', 'X-OTRS-TicketValue');
      my $CounterTmp = 0;
***************
*** 206,212 ****
          }
      }
!     # --
      # do article db insert
-     # --
      my $ArticleID = $Self->{TicketObject}->ArticleCreate(
          TicketID => $TicketID,
--- 195,200 ----
          }
      }
! 
      # do article db insert
      my $ArticleID = $Self->{TicketObject}->ArticleCreate(
          TicketID => $TicketID,
***************
*** 228,234 ****
          Queue => $Queue,
      );
!     # --
      # close ticket if article create failed!
-     # --
      if (!$ArticleID) {
          $Self->{TicketObject}->TicketDelete(
--- 216,221 ----
          Queue => $Queue,
      );
! 
      # close ticket if article create failed!
      if (!$ArticleID) {
          $Self->{TicketObject}->TicketDelete(
***************
*** 243,249 ****
          return;
      }
!     # --
      # debug
-     # --
      if ($Self->{Debug} > 0) {
          print "From: $GetParam{From}\n";
--- 230,235 ----
          return;
      }
! 
      # debug
      if ($Self->{Debug} > 0) {
          print "From: $GetParam{From}\n";
***************
*** 257,263 ****
          print "ArticleType: $GetParam{'X-OTRS-ArticleType'}\n";
      }
!     # --
      # set free article text
-     # --
      @Values = ('X-OTRS-ArticleKey', 'X-OTRS-ArticleValue');
      $CounterTmp = 0;
--- 243,248 ----
          print "ArticleType: $GetParam{'X-OTRS-ArticleType'}\n";
      }
! 
      # set free article text
      @Values = ('X-OTRS-ArticleKey', 'X-OTRS-ArticleValue');
      $CounterTmp = 0;
***************
*** 279,285 ****
          }
      }
!     # --
      # write plain email to the storage
-     # --
      $Self->{TicketObject}->ArticleWritePlain(
          ArticleID => $ArticleID,
--- 264,269 ----
          }
      }
! 
      # write plain email to the storage
      $Self->{TicketObject}->ArticleWritePlain(
          ArticleID => $ArticleID,
***************
*** 287,293 ****
          UserID => $Param{InmailUserID},
      );
!     # --
      # write attachments to the storage
-     # --
      foreach my $Attachment ($Self->{ParseObject}->GetAttachments()) {
          $Self->{TicketObject}->ArticleWriteAttachment(
--- 271,276 ----
          UserID => $Param{InmailUserID},
      );
! 
      # write attachments to the storage
      foreach my $Attachment ($Self->{ParseObject}->GetAttachments()) {
          $Self->{TicketObject}->ArticleWriteAttachment(
***************
*** 302,306 ****
      return $TicketID;
  }
- # --
  
  1;
--- 285,288 ----

Index: Reject.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/PostMaster/Reject.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** Reject.pm	31 Oct 2006 15:26:53 -0000	1.5
--- Reject.pm	2 Nov 2006 13:02:04 -0000	1.6
***************
*** 18,22 ****
  $VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/;
  
- # --
  sub new {
      my $Type = shift;
--- 18,21 ----
***************
*** 40,55 ****
      return $Self;
  }
! # --
  sub Run {
      my $Self = shift;
      my %Param = @_;
!     # --
      # check needed stuff
-     # --
      foreach (qw(TicketID InmailUserID GetParam Tn AutoResponseType)) {
!       if (!$Param{$_}) {
!         $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
!         return;
!       }
      }
      my %GetParam = %{$Param{GetParam}};
--- 39,53 ----
      return $Self;
  }
! 
  sub Run {
      my $Self = shift;
      my %Param = @_;
! 
      # check needed stuff
      foreach (qw(TicketID InmailUserID GetParam Tn AutoResponseType)) {
!         if (!$Param{$_}) {
!             $Self->{LogObject}->Log(Priority => 'error', Message => "Need $_!");
!             return;
!         }
      }
      my %GetParam = %{$Param{GetParam}};
***************
*** 84,90 ****
          return;
      }
!     # --
      # debug
-     # --
      if ($Self->{Debug} > 0) {
          print "Reject Follow up Ticket\n";
--- 82,87 ----
          return;
      }
! 
      # debug
      if ($Self->{Debug} > 0) {
          print "Reject Follow up Ticket\n";
***************
*** 99,105 ****
          print "ArticleType: $GetParam{'X-OTRS-ArticleType'}\n";
      }
!     # --
      # write plain email to the storage
-     # --
      $Self->{TicketObject}->ArticleWritePlain(
          ArticleID => $ArticleID,
--- 96,101 ----
          print "ArticleType: $GetParam{'X-OTRS-ArticleType'}\n";
      }
! 
      # write plain email to the storage
      $Self->{TicketObject}->ArticleWritePlain(
          ArticleID => $ArticleID,
***************
*** 107,113 ****
          UserID => $Param{InmailUserID},
      );
!     # --
      # write attachments to the storage
-     # --
      foreach my $Attachment ($Self->{ParseObject}->GetAttachments()) {
          $Self->{TicketObject}->ArticleWriteAttachment(
--- 103,108 ----
          UserID => $Param{InmailUserID},
      );
! 
      # write attachments to the storage
      foreach my $Attachment ($Self->{ParseObject}->GetAttachments()) {
          $Self->{TicketObject}->ArticleWriteAttachment(
***************
*** 119,125 ****
          );
      }
!     # --
      # set free article text
-     # --
      my @Values = ('X-OTRS-FollowUp-ArticleKey', 'X-OTRS-FollowUp-ArticleValue');
      my $CounterTmp = 0;
--- 114,119 ----
          );
      }
! 
      # set free article text
      my @Values = ('X-OTRS-FollowUp-ArticleKey', 'X-OTRS-FollowUp-ArticleValue');
      my $CounterTmp = 0;
***************
*** 151,154 ****
      return 1;
  }
! # --
  1;
--- 145,148 ----
      return 1;
  }
! 
  1;



More information about the cvs-log mailing list