Commit 26b1242d authored by gerv%gerv.net's avatar gerv%gerv.net

Bug 227771 - Migration and product/component create code no longer writes series…

Bug 227771 - Migration and product/component create code no longer writes series to database. Patch by gerv; r=kiko, a=justdave.
parent d001808d
......@@ -3727,9 +3727,10 @@ if (!$series_exists) {
foreach my $field (@fields) {
# Create a Series for each field in this product
my $series = new Bugzilla::Series($product, $all_name,
my $series = new Bugzilla::Series(undef, $product, $all_name,
$field, $::userid, 1,
$queries{$field}, 1);
$series->writeToDatabase();
$seriesids{$field} = $series->{'series_id'};
}
......@@ -3737,9 +3738,10 @@ if (!$series_exists) {
# the same set as new products (see editproducts.cgi.)
my @openedstatuses = ("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED");
my $query = join("&", map { "bug_status=$_" } @openedstatuses);
my $series = new Bugzilla::Series($product, $all_name,
my $series = new Bugzilla::Series(undef, $product, $all_name,
$open_name, $::userid, 1,
$query_prod . $query, 1);
$series->writeToDatabase();
# Now, we attempt to read in historical data, if any
# Convert the name in the same way that collectstats.pl does
......
......@@ -466,9 +466,10 @@ if ($action eq 'new') {
push(@series, [$::FORM{'closed_name'}, $resolved . $prodcomp]);
foreach my $sdata (@series) {
my $series = new Bugzilla::Series($product, $component,
my $series = new Bugzilla::Series(undef, $product, $component,
$sdata->[0], $::userid, 1,
$sdata->[1], 1);
$series->writeToDatabase();
}
# Make versioncache flush
......
......@@ -428,9 +428,11 @@ if ($action eq 'new') {
push(@series, [$::FORM{'open_name'}, $query]);
foreach my $sdata (@series) {
my $series = new Bugzilla::Series($product, $::FORM{'subcategory'},
my $series = new Bugzilla::Series(undef, $product,
$::FORM{'subcategory'},
$sdata->[0], $::userid, 1,
$sdata->[1] . "&product=$product", 1);
$series->writeToDatabase();
}
# Make versioncache flush
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment