From a73890d2ef8851ddae6b4991998824596a0f5644 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Thu, 17 Dec 2009 23:31:51 +0000 Subject: Bug 162060: Remove the relationship between "votestoconfirm" and whether or not the UNCONFIRMED status is available, by adding a checkbox to enable the UNCONFIRMED status in editproducts.cgi. Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/Install/DB.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Bugzilla/Install/DB.pm') diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 414731fbe..adbcb285f 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -592,6 +592,8 @@ sub update_table_definitions { $dbh->bz_drop_column('products', 'milestoneurl'); + _add_allows_unconfirmed_to_product_table(); + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ @@ -3328,6 +3330,16 @@ sub _set_attachment_comment_types { _populate_bugs_fulltext($bug_ids); } +sub _add_allows_unconfirmed_to_product_table { + my $dbh = Bugzilla->dbh; + if (!$dbh->bz_column_info('products', 'allows_unconfirmed')) { + $dbh->bz_add_column('products', 'allows_unconfirmed', + { TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE' }); + $dbh->do('UPDATE products SET allows_unconfirmed = 1 + WHERE votestoconfirm > 0'); + } +} + 1; __END__ -- cgit v1.2.3-24-g4f1b