[Rt-commit] rt branch 5.0/importer-ignore-class-hotlist created. rt-5.0.2-56-gfe82d32ed2
BPS Git Server
git at git.bestpractical.com
Fri Jan 7 14:30:46 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/importer-ignore-class-hotlist has been created
at fe82d32ed231979b33465beb3bfa2a18675ad5b7 (commit)
- Log -----------------------------------------------------------------
commit fe82d32ed231979b33465beb3bfa2a18675ad5b7
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Jan 7 22:07:49 2022 +0800
Ignore HotList column for RT::Class on importing
HotList column has been dropped since RT 5, if we import seralized data
from RT 4, we could get the following error:
ERROR: column "hotlist" does not exist
This commit deletes HotList column in PreInflate to get rid of this
issue. Note that we need to do this in RT::Record instead of RT::Class
to cover both "clone" and "non-clone" modes of rt-serializer.
diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 3b6a3368cb..b49e3178aa 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -2863,6 +2863,9 @@ sub PreInflate {
my $class = shift;
my ($importer, $uid, $data) = @_;
+ # In case it's RT::Class from RT 4 that has HotList column
+ delete $data->{HotList} if $uid =~ /^RT::Class-/;
+
my $ca = $class->_ClassAccessible;
my %ca = %{ $ca };
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list