[Rt-commit] rt branch 5.0/validator-skip-contenthistory created. rt-5.0.2-61-g8dca7ff41b
BPS Git Server
git at git.bestpractical.com
Thu Feb 3 16:57:03 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 8dca7ff41b281f09cdba317acbca5134fe5a3662 (commit)
- Log -----------------------------------------------------------------
commit 8dca7ff41b281f09cdba317acbca5134fe5a3662
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..482cc5cc75 100644
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
@@ -987,8 +987,8 @@ push @CHECKS, Attributes => sub {
foreach my $model ( @models ) {
$res *= check_integrity(
'Attributes', 'ObjectId' => m2t($model), 'id',
- condition => 's.ObjectType = ?',
- bind_values => [ "RT::$model" ],
+ condition => 's.ObjectType = ? AND s.Name != ?',
+ bind_values => [ "RT::$model", "ContentHistory" ],
);
}
return $res;
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list