[Rt-commit] rt branch, 4.0/global-cf-in-create-tickets-fix, created. rt-4.0.2rc1-1-g79c50ab

? sunnavy sunnavy at bestpractical.com
Tue Aug 9 06:21:50 EDT 2011


The branch, 4.0/global-cf-in-create-tickets-fix has been created
        at  79c50ab6486caf6a15714d386f9b9ec3ca981c54 (commit)

- Log -----------------------------------------------------------------
commit 79c50ab6486caf6a15714d386f9b9ec3ca981c54
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Aug 9 17:55:20 2011 +0800

    need to set Queue => 0 to safely load a global cf

diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
index 432bbcd..7f294e3 100644
--- a/lib/RT/Action/CreateTickets.pm
+++ b/lib/RT/Action/CreateTickets.pm
@@ -781,13 +781,13 @@ sub ParseLines {
         } elsif ( $orig_tag =~ /^(?:customfield|cf)-?(.+)$/i ) {
             my $cf = RT::CustomField->new( $self->CurrentUser );
             $cf->LoadByName( Name => $1, Queue => $ticketargs{Queue} );
-            $cf->LoadByName( Name => $1 ) unless $cf->id;
+            $cf->LoadByName( Name => $1, Queue => 0 ) unless $cf->id;
             next unless $cf->id;
             $ticketargs{ "CustomField-" . $cf->id } = $args{$tag};
         } elsif ($orig_tag) {
             my $cf = RT::CustomField->new( $self->CurrentUser );
             $cf->LoadByName( Name => $orig_tag, Queue => $ticketargs{Queue} );
-            $cf->LoadByName( Name => $orig_tag ) unless $cf->id;
+            $cf->LoadByName( Name => $orig_tag, Queue => 0 ) unless $cf->id;
             next unless $cf->id;
             $ticketargs{ "CustomField-" . $cf->id } = $args{$tag};
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list