From: Frank Becker Date: Fri, 10 Dec 2010 21:32:25 +0000 (-0800) Subject: Bug 610182: Support enabling UNCONFIRMED in all products when using X-Git-Tag: bugzilla-4.0rc2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e03d8fe96d101426149a1011458971b47aac20d;p=thirdparty%2Fbugzilla.git Bug 610182: Support enabling UNCONFIRMED in all products when using contrib/convert-workflow.pl r=mkanat, a=mkanat --- diff --git a/contrib/convert-workflow.pl b/contrib/convert-workflow.pl index 322857f5b0..60029f67ab 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 <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 <