fix transaction custom field handling, #11168
authorMark Wells <mark@freeside.biz>
Wed, 22 Aug 2012 01:44:31 +0000 (18:44 -0700)
committerMark Wells <mark@freeside.biz>
Wed, 22 Aug 2012 01:44:31 +0000 (18:44 -0700)
rt/lib/RT/Transaction.pm

index bd4d835..3344687 100755 (executable)
@@ -133,12 +133,6 @@ sub Create {
         return ( 0, $self->loc( "Transaction->Create couldn't, as you didn't specify an object type and id"));
     }
 
-
-    # Set up any custom fields passed at creation.  Has to happen 
-    # before scrips.
-    
-    $self->UpdateCustomFields(%{ $args{'CustomFields'} });
-
     #lets create our transaction
     my %params = (
         Type      => $args{'Type'},
@@ -169,6 +163,11 @@ sub Create {
         }
     }
 
+    # Set up any custom fields passed at creation.  Has to happen 
+    # before scrips.
+    
+    $self->UpdateCustomFields(%{ $args{'CustomFields'} });
+
     $self->AddAttribute(
         Name    => 'SquelchMailTo',
         Content => RT::User->CanonicalizeEmailAddress($_)