diff options
Diffstat (limited to 'Bugzilla/Migrate.pm')
-rw-r--r-- | Bugzilla/Migrate.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Bugzilla/Migrate.pm b/Bugzilla/Migrate.pm index dce795400..e074d4c01 100644 --- a/Bugzilla/Migrate.pm +++ b/Bugzilla/Migrate.pm @@ -584,6 +584,7 @@ sub insert_products { my ($self, $products) = @_; foreach my $product (@$products) { my $components = delete $product->{components}; + my $groups = delete $product->{groups}; my $created_prod = new Bugzilla::Product({name => $product->{name}}); if (!$created_prod) { @@ -591,6 +592,21 @@ sub insert_products { print get_text('migrate_product_created', {created => $created_prod}), "\n"; } + for my $group (@$groups) { + my $group_id = new Bugzilla::Group({name => $group->{name}}); + if (!$group_id) { + $group_id = Bugzilla::Group->create({ + name => $group->{name}, + description => $group->{description}, + isbuggroup => 1, + isactive => 1, + owner_user_id => $group->{owner}, + }); + } + $created_prod->set_group_controls($group_id, $group->{settings}); + $created_prod->update(); + } + foreach my $component (@$components) { next if new Bugzilla::Component({ |