From dc87344e0798f4d2826a5b790897ce7f6682437b Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Thu, 16 Jul 2015 21:00:39 -0400 Subject: Bug 1183524 - api bustage caused by bug 1173442 --- docker/generate_bmo_data.pl | 4 ++++ qa/config/generate_test_data.pl | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/docker/generate_bmo_data.pl b/docker/generate_bmo_data.pl index 45cde24f0..84b0f0bf8 100755 --- a/docker/generate_bmo_data.pl +++ b/docker/generate_bmo_data.pl @@ -386,6 +386,10 @@ foreach my $group (@groups) { } } +# Update default security group settings for new products +my $default_security_group = Bugzilla::Group->new({ name => 'core-security' }); +$dbh->do('UPDATE products SET security_group_id = ?', undef, $default_security_group->id); + ########################################################################## # Set Parameters ########################################################################## diff --git a/qa/config/generate_test_data.pl b/qa/config/generate_test_data.pl index d0281d181..4891d30bc 100644 --- a/qa/config/generate_test_data.pl +++ b/qa/config/generate_test_data.pl @@ -350,6 +350,7 @@ foreach my $class (@classifications) { undef, ( $class->{name}, $class->{description} )); } } + ########################################################################## # Create Products ########################################################################## @@ -562,6 +563,14 @@ my $canconfirm = Bugzilla::Group->new({ name => 'canconfirm' }); $dbh->do('INSERT INTO group_group_map VALUES (?, ?, 0)', undef, $editbugs->id, $canconfirm->id); +# BMO: Update default security group settings for new products +my $default_security_group = Bugzilla::Group->new({ name => 'core-security' }); +$default_security_group ||= Bugzilla::Group->new({ name => 'Master' }); +foreach my $product (@products) { + $dbh->do('UPDATE products SET security_group_id = ? WHERE name = ?', + undef, $default_security_group->id, $product->{product_name}); +} + ########################################################################## # Add Users to Groups ########################################################################## -- cgit v1.2.3-24-g4f1b