From 88101dcba7f4e60c862c14b6ba9c0861c62d3395 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Wed, 10 Apr 2019 23:42:13 -0400 Subject: [PATCH] Bug 1541303 - Default component bug type is not set as expected; enhancement severity is still used for existing bugs --- extensions/BMO/bin/migrate-bug-type.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/BMO/bin/migrate-bug-type.pl b/extensions/BMO/bin/migrate-bug-type.pl index c05057630..a01b3a7a4 100644 --- a/extensions/BMO/bin/migrate-bug-type.pl +++ b/extensions/BMO/bin/migrate-bug-type.pl @@ -113,7 +113,8 @@ my $dbh = Bugzilla->dbh; $dbh->bz_start_transaction; say 'Change the type of all bugs with the "enhancement" severity to "enhancement"'; -$dbh->do('UPDATE bugs SET bug_type = "enhancement" WHERE bug_severity = "enhancement"'); +$dbh->do('UPDATE bugs SET bug_type = "enhancement", bug_severity = "normal" + WHERE bug_severity = "enhancement"'); say 'Disable the "enhancement" severity'; $dbh->do('UPDATE bug_severity SET isactive = 0 WHERE value = "enhancement"'); @@ -139,7 +140,7 @@ foreach my $target (@MIGRATION_MAP) { say 'Select components'; my $comp_ids = $dbh->selectcol_arrayref( 'SELECT component.id FROM components as component - JOIN products AS product ON component.id = product.id + JOIN products AS product ON component.product_id = product.id WHERE product.name = ?' . ($component ? ' AND component.name = ?' : ''), undef, ($component ? ($product, $component) : ($product))); -- 2.47.3