diff options
author | 2009-07-18 17:02:41 +0000 | |
---|---|---|
committer | 2009-07-18 17:02:41 +0000 | |
commit | 75e516184ed75b1daecda4c796c86f81c63da982 (patch) | |
tree | 013dda0341d037d47bc37c2caf86b9f03a14b037 /sanitycheck.cgi | |
parent | Bug 456743 - Add the ability to disable field values (mark them as inactive) (diff) | |
download | bugzilla-75e516184ed75b1daecda4c796c86f81c63da982.tar.gz bugzilla-75e516184ed75b1daecda4c796c86f81c63da982.tar.bz2 bugzilla-75e516184ed75b1daecda4c796c86f81c63da982.zip |
Bug 323606: sanitycheck.cgi should offer a link to fix everconfirmed - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=LpSolit
Diffstat (limited to 'sanitycheck.cgi')
-rwxr-xr-x | sanitycheck.cgi | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sanitycheck.cgi b/sanitycheck.cgi index c43641fb6..69ab80faf 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -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'); |