]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 620796: Make Bugzilla::Migrate skip abnormal fields when doing
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 21 Dec 2010 23:55:01 +0000 (15:55 -0800)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 21 Dec 2010 23:55:01 +0000 (15:55 -0800)
create_legal_values (otherwise it tried to create Components there, when
it should not have).
r=mkanat, a=mkanat (module owner)

Bugzilla/Migrate.pm

index e72c5c52e6926dd16b749e983066aea96a6593e7..f28854957a7ab55c64a4aff12f12c4784de74478 100644 (file)
@@ -573,6 +573,7 @@ sub insert_users {
     }
 }
 
+# XXX This should also insert Classifications.
 sub insert_products {
     my ($self, $products) = @_;
     foreach my $product (@$products) {
@@ -639,6 +640,7 @@ sub create_legal_values {
     }
     
     foreach my $field (@select_fields) {
+        next if $field->is_abnormal;
         my $name = $field->name;
         foreach my $value (keys %{ $values{$name} }) {
             next if Bugzilla::Field::Choice->type($field)->new({ name => $value });