[Rt-commit] [svn] r1081 - rt/trunk/lib/RT

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Wed Jun 16 10:53:11 EDT 2004


Author: alexmv
Date: Wed Jun 16 10:53:11 2004
New Revision: 1081

Modified:
   rt/trunk/lib/RT/Ticket_Overlay.pm
Log:
RT-Ticket: 5669
RT-Status: resolved
RT-Update: correspond

 * Record initial time taken in the initial transaction


Modified: rt/trunk/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/trunk/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/trunk/lib/RT/Ticket_Overlay.pm	Wed Jun 16 10:53:11 2004
@@ -319,11 +319,11 @@
                  Subject         => '',
                  InitialPriority => undef,
                  FinalPriority   => undef,
-                 Priority   => undef,
+                 Priority        => undef,
                  Status          => 'new',
-                 TimeWorked      => "0",
+                 TimeWorked      => 0,
                  TimeLeft        => 0,
-                 TimeEstimated        => 0,
+                 TimeEstimated   => 0,
                  Due             => undef,
                  Starts          => undef,
                  Started         => undef,
@@ -517,7 +517,9 @@
         delete $params{$attr}  unless (exists $params{$attr} && $params{$attr});
     }
 
-
+    # Delete the time worked if we're counting it in the transaction
+    delete $params{TimeWorked} if $args{'_RecordTransaction'};
+    
     my ($id,$ticket_message) = $self->SUPER::Create( %params);
     unless ($id) {
         $RT::Logger->crit( "Couldn't create a ticket: " . $ticket_message);
@@ -628,7 +630,7 @@
         # {{{ Add a transaction for the create
         my ( $Trans, $Msg, $TransObj ) = $self->_NewTransaction(
                                                      Type      => "Create",
-                                                     TimeTaken => 0,
+                                                     TimeTaken => $args{'TimeWorked'},
                                                      MIMEObj => $args{'MIMEObj'}
         );
 


More information about the Rt-commit mailing list