[Rt-commit] rt branch, 5.0/serialize-skip-attributes-of-attributes, created. rt-5.0.1-427-g951ca3970a

? sunnavy sunnavy at bestpractical.com
Wed Jun 2 09:17:49 EDT 2021


The branch, 5.0/serialize-skip-attributes-of-attributes has been created
        at  951ca3970ac3a12eb57ebce96f4cb29025e2a0ee (commit)

- Log -----------------------------------------------------------------
commit 951ca3970ac3a12eb57ebce96f4cb29025e2a0ee
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Jun 2 05:36:46 2021 +0800

    Skip attributes of attributes in serializeration as it's unsupported yet
    
    This is initially for "ChangeHistory" of saved searches. Technically,
    it's because we can't use "Name" as identifier of attributes because
    attribute name is not unique.

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 0cd12b73e5..3b6a3368cb 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -2747,9 +2747,14 @@ sub FindDependencies {
         }
     }
 
+    my $objs;
+
     # Object attributes, we have to check on every object
-    my $objs = $self->Attributes;
-    $deps->Add( in => $objs );
+    # attributes of attributes are not supported yet though.
+    if ( !$self->isa('RT::Attribute') ) {
+        $objs = $self->Attributes;
+        $deps->Add( in => $objs );
+    }
 
     # Transactions
     if (   $self->isa("RT::Ticket")
diff --git a/t/api/initialdata-roundtrip.t b/t/api/initialdata-roundtrip.t
index a5b2b68329..fbd349507d 100644
--- a/t/api/initialdata-roundtrip.t
+++ b/t/api/initialdata-roundtrip.t
@@ -1110,14 +1110,6 @@ for my $test (@tests) {
     };
 }
 
-TODO: {
-    # Failed to load object RT::Attribute-Dashboard
-    # Failed to load object RT::Attribute-Subscription
-    local $TODO = "attribute's attributes are not supported yet.";
-    Test::NoWarnings::had_no_warnings();
-    Test::NoWarnings::clear_warnings();
-}
-
 RT::Test::done_testing();
 
 sub autorollback {

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


More information about the rt-commit mailing list