[Rt-commit] rt branch 5.0/validator-skip-contenthistory created. rt-5.0.2-61-g35dd192170

BPS Git Server git at git.bestpractical.com
Wed Feb 2 22:01:25 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/validator-skip-contenthistory has been created
        at  35dd1921709208b940eaa9566ff6b08bf6213799 (commit)

- Log -----------------------------------------------------------------
commit 35dd1921709208b940eaa9566ff6b08bf6213799
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Feb 1 13:42:20 2022 -0500

    Skip ContentHistory entries when validating Attributes
    
    ContentHistory entries were added to the Attributes table as
    a way to track deleted Saved Searches, Dashboards, and
    Subscriptions. Since the attribute they were created to track
    was deleted, it is correct for that original attribute to no
    longer exist. Exclude these records from the referential
    integrity check on Attributes.

diff --git a/sbin/rt-validator.in b/sbin/rt-validator.in
index ac686af5d3..b2c5832fcc 100644
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
@@ -987,7 +987,7 @@ push @CHECKS, Attributes => sub {
     foreach my $model ( @models ) {
         $res *= check_integrity(
             'Attributes', 'ObjectId' => m2t($model), 'id',
-            condition   => 's.ObjectType = ?',
+            condition   => 's.ObjectType = ? AND s.Name != "ContentHistory"',
             bind_values => [ "RT::$model" ],
         );
     }

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list