[Rt-commit] r2861 - in rt/branches/3.4-RELEASE: . lib/RT/Action

robert at bestpractical.com robert at bestpractical.com
Tue May 10 01:54:36 EDT 2005


Author: robert
Date: Tue May 10 01:54:35 2005
New Revision: 2861

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm
Log:
 r2875 at bear:  rspier | 2005-05-10T05:54:13.875334Z
 quick and dirty fix (ok, not so quick, and not really so dirty)
 for the recursive CreateTickets dataloss issue.
 


Modified: rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Action/CreateTickets.pm	Tue May 10 01:54:35 2005
@@ -565,12 +565,14 @@
     # XXX: cargo cult programming that works. i'll be back.
     use bytes;
 
-    %T::Tickets = ();
+    local %T::Tickets = %T::Tickets;
+    local $T::TOP = $T::TOP;
+    local $T::ID = $T::ID;
+    $T::Tickets{'TOP'} = $T::TOP = $top if $top;
 
     my $ticketargs;
     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")
           if $T::TOP;
 
@@ -628,7 +630,8 @@
     use bytes;
 
     my @results;
-    %T::Tickets = ();
+    local %T::Tickets = %T::Tickets;
+    local $T::ID = $T::ID;
 
     my $ticketargs;
     my ( @links, @postponed );


More information about the Rt-commit mailing list