summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-18 00:31:51 +0100
committermkanat%bugzilla.org <>2009-12-18 00:31:51 +0100
commita73890d2ef8851ddae6b4991998824596a0f5644 (patch)
treea154cc5cd26842300bb0dd513ed7949c67682153 /Bugzilla/Install/DB.pm
parent3eb0b0d657efa47583d5bea699d8b9a62547fb6c (diff)
downloadbugzilla-a73890d2ef8851ddae6b4991998824596a0f5644.tar.gz
bugzilla-a73890d2ef8851ddae6b4991998824596a0f5644.tar.xz
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 <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r--Bugzilla/Install/DB.pm12
1 files changed, 12 insertions, 0 deletions
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__