Commit 75e51618 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 323606: sanitycheck.cgi should offer a link to fix everconfirmed - Patch by…

Bug 323606: sanitycheck.cgi should offer a link to fix everconfirmed - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
parent e394756f
......@@ -219,6 +219,22 @@ if ($cgi->param('repair_creation_date')) {
}
###########################################################################
# Fix everconfirmed
###########################################################################
if ($cgi->param('repair_everconfirmed')) {
Status('everconfirmed_start');
my @confirmed_open_states = grep {$_ ne 'UNCONFIRMED'} BUG_STATE_OPEN;
my $confirmed_open_states = join(', ', map {$dbh->quote($_)} @confirmed_open_states);
$dbh->do("UPDATE bugs SET everconfirmed = 0 WHERE bug_status = 'UNCONFIRMED'");
$dbh->do("UPDATE bugs SET everconfirmed = 1 WHERE bug_status IN ($confirmed_open_states)");
Status('everconfirmed_end');
}
###########################################################################
# Fix entries in Bugs full_text
###########################################################################
......@@ -939,13 +955,13 @@ BugCheck("bugs WHERE bug_status NOT IN ($open_states) AND resolution = ''",
Status('bug_check_status_everconfirmed');
BugCheck("bugs WHERE bug_status = 'UNCONFIRMED' AND everconfirmed = 1",
'bug_check_status_everconfirmed_error_text');
'bug_check_status_everconfirmed_error_text', 'repair_everconfirmed');
my @confirmed_open_states = grep {$_ ne 'UNCONFIRMED'} BUG_STATE_OPEN;
my $confirmed_open_states = join(', ', map {$dbh->quote($_)} @confirmed_open_states);
BugCheck("bugs WHERE bug_status IN ($confirmed_open_states) AND everconfirmed = 0",
'bug_check_status_everconfirmed_error_text2');
'bug_check_status_everconfirmed_error_text2', 'repair_everconfirmed');
Status('bug_check_votes_everconfirmed');
......
......@@ -169,6 +169,12 @@
[% END %]
[% END %]
[% ELSIF san_tag == "everconfirmed_start" %]
OK, now fixing everconfirmed.
[% ELSIF san_tag == "everconfirmed_end" %]
everconfirmed fixed.
[% ELSIF san_tag == "flag_check_start" %]
Checking for flags being in the wrong product/component.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment