Commit 839d66da authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 373411: The bug resolution can be set independently of the bug status -…

Bug 373411: The bug resolution can be set independently of the bug status - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
parent c2a52392
......@@ -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;
......
......@@ -1286,6 +1286,10 @@
[% title = "Summary Needed" %]
You must enter a summary for this [% terms.bug %].
[% ELSIF error == "resolution_not_allowed" %]
[% title = "Resolution Not Allowed" %]
You cannot set a resolution for open [% terms.bugs %].
[% ELSIF error == "saved_search_used_by_whines" %]
[% title = "Saved Search In Use" %]
[% docslinks = {'whining.html' => 'About Whining'} %]
......
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