]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 398735: sanitycheck.cgi hardcodes bug statuses in the everconfirmed check - Patch...
authorlpsolit%gmail.com <>
Mon, 8 Oct 2007 04:00:03 +0000 (04:00 +0000)
committerlpsolit%gmail.com <>
Mon, 8 Oct 2007 04:00:03 +0000 (04:00 +0000)
sanitycheck.cgi

index 157281b11e73924fa475630f0ff570765bc8d57d..ef92256a20cb72d79c1e0810a2a04a9183e7141b 100755 (executable)
@@ -874,11 +874,11 @@ Status('bug_check_status_everconfirmed');
 
 BugCheck("bugs WHERE bug_status = 'UNCONFIRMED' AND everconfirmed = 1",
          'bug_check_status_everconfirmed_error_text');
-# The below list of resolutions is hard-coded because we don't know if future
-# resolutions will be confirmed, unconfirmed or maybeconfirmed.  I suspect
-# they will be maybeconfirmed, e.g. ASLEEP and REMIND.  This hardcoding should
-# disappear when we have customized statuses.
-BugCheck("bugs WHERE bug_status IN ('NEW', 'ASSIGNED', 'REOPENED') AND everconfirmed = 0",
+
+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');
 
 Status('bug_check_votes_everconfirmed');