[Rt-commit] rt branch, 4.2/exclude-disabled-cf-initialdata, created. rt-4.2.1-54-g5bf0f62

Jim Brandt jbrandt at bestpractical.com
Mon Dec 16 14:34:01 EST 2013


The branch, 4.2/exclude-disabled-cf-initialdata has been created
        at  5bf0f624b4f28d84b6d2d4e3462ea4015815374b (commit)

- Log -----------------------------------------------------------------
commit 5bf0f624b4f28d84b6d2d4e3462ea4015815374b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Dec 16 14:32:38 2013 -0500

    Only return not disabled CFs when loading for BasedOn setting

diff --git a/lib/RT/Handle.pm b/lib/RT/Handle.pm
index 9a481a9..b6a7c01 100644
--- a/lib/RT/Handle.pm
+++ b/lib/RT/Handle.pm
@@ -947,8 +947,10 @@ sub InsertData {
             if ( $item->{'BasedOn'} ) {
                 if ( $item->{'LookupType'} ) {
                     my $basedon = RT::CustomField->new($RT::SystemUser);
-                    my ($ok, $msg ) = $basedon->LoadByCols( Name => $item->{'BasedOn'},
-                                                            LookupType => $item->{'LookupType'} );
+                    my ($ok, $msg ) = $basedon->LoadByCols(
+                        Name => $item->{'BasedOn'},
+                        LookupType => $item->{'LookupType'},
+                        Disabled => 0 );
                     if ($ok) {
                         $item->{'BasedOn'} = $basedon->Id;
                     } else {

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


More information about the rt-commit mailing list