aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorFrank Becker <Frank@Frank-Becker.de>2010-12-10 13:31:37 -0800
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-12-10 13:31:37 -0800
commitfae7f1233435d9d13413b41181bb41ee8b51e8c9 (patch)
tree401dc15462a6a545517df715f223fb603e7e0b74 /contrib
parent51ae9740265bc2aeda00b77c174cac860625f0c4 (diff)
downloadbugs-fae7f1233435d9d13413b41181bb41ee8b51e8c9.tar
bugs-fae7f1233435d9d13413b41181bb41ee8b51e8c9.tar.gz
bugs-fae7f1233435d9d13413b41181bb41ee8b51e8c9.tar.bz2
bugs-fae7f1233435d9d13413b41181bb41ee8b51e8c9.tar.xz
bugs-fae7f1233435d9d13413b41181bb41ee8b51e8c9.zip
Bug 610182: Support enabling UNCONFIRMED in all products when using
contrib/convert-workflow.pl r=mkanat, a=mkanat
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/convert-workflow.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/contrib/convert-workflow.pl b/contrib/convert-workflow.pl
index 322857f5b..60029f67a 100755
--- a/contrib/convert-workflow.pl
+++ b/contrib/convert-workflow.pl
@@ -27,6 +27,7 @@ use Bugzilla;
use Bugzilla::Config qw(:admin);
use Bugzilla::Search::Saved;
use Bugzilla::Status;
+use Getopt::Long;
my $confirmed = new Bugzilla::Status({ name => 'CONFIRMED' });
my $in_progress = new Bugzilla::Status({ name => 'IN_PROGRESS' });
@@ -35,6 +36,8 @@ if ($confirmed and $in_progress) {
print "You are already using the new workflow.\n";
exit 1;
}
+my $enable_unconfirmed = 0;
+my $result = GetOptions("enable-unconfirmed" => \$enable_unconfirmed);
print <<END;
WARNING: This will convert the status of all bugs using the following
@@ -50,8 +53,16 @@ so that it appears that these statuses were always in existence.
Emails will not be sent for the change.
-To continue, press any key, or press Ctrl-C to stop this program...
END
+if ($enable_unconfirmed) {
+ print "UNCONFIRMED will be enabled in all products.\n";
+} else {
+ print <<END;
+If you also want to enable the UNCONFIRMED status in every product,
+restart this script with the --enable-unconfirmed option.
+END
+}
+print "\nTo continue, press any key, or press Ctrl-C to stop this program...";
getc;
my $dbh = Bugzilla->dbh;
@@ -105,7 +116,10 @@ foreach my $pair (@translation) {
Bugzilla::Series->Bugzilla::Search::Saved::rename_field_value('bug_status',
$from, $to);
}
-
+if ($enable_unconfirmed) {
+ print "Enabling UNCONFIRMED in all products...\n";
+ $dbh->do('UPDATE products SET allows_unconfirmed = 1');
+}
$dbh->bz_commit_transaction();
print <<END;