summaryrefslogtreecommitdiffstats
path: root/process_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-03-10 19:20:01 +0100
committerlpsolit%gmail.com <>2007-03-10 19:20:01 +0100
commit839d66da3f158712fe59bf5fd480df12512f4bf6 (patch)
tree7343c60a28bff6caaaaaf3f6a001d405a5f54991 /process_bug.cgi
parentc2a52392f06eb2ae403ddcb13dd414dc4828090f (diff)
downloadbugzilla-839d66da3f158712fe59bf5fd480df12512f4bf6.tar.gz
bugzilla-839d66da3f158712fe59bf5fd480df12512f4bf6.tar.xz
Bug 373411: The bug resolution can be set independently of the bug status - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-xprocess_bug.cgi11
1 files changed, 11 insertions, 0 deletions
diff --git a/process_bug.cgi b/process_bug.cgi
index fd0c3eb9d..18097d084 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -1110,6 +1110,17 @@ SWITCH: for ($cgi->param('knob')) {
ChangeStatus('RESOLVED');
}
+ else {
+ # You cannot use change_resolution if there is at least
+ # one open bug.
+ my $open_states = join(',', map {$dbh->quote($_)} BUG_STATE_OPEN);
+ my $idlist = join(',', @idlist);
+ my $is_open =
+ $dbh->selectrow_array("SELECT 1 FROM bugs WHERE bug_id IN ($idlist)
+ AND bug_status IN ($open_states)");
+
+ ThrowUserError('resolution_not_allowed') if $is_open;
+ }
ChangeResolution($bug, $cgi->param('resolution'));
last SWITCH;