From 39a329b9ac46424a4552e8c68e44467173a8238c Mon Sep 17 00:00:00 2001 From: "justdave%syndicomm.com" <> Date: Thu, 18 Mar 2004 13:55:41 +0000 Subject: Bug 24496: Adds a parameter "noresolveonopenblockers" which when enabled, prevents bugs from being closed if there are any bugs blocking it which are still open. Patch by Andreas Höfler r= justdave, a= myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process_bug.cgi | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'process_bug.cgi') diff --git a/process_bug.cgi b/process_bug.cgi index 774883a9c..4df90efd2 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -890,6 +890,17 @@ SWITCH: for ($::FORM{'knob'}) { ThrowUserError("resolving_remaining_time"); } } + + # don't resolve as fixed while still unresolved blocking bugs + if (Param("noresolveonopenblockers") && ($::FORM{'resolution'} eq 'FIXED')) { + my @dependencies = CountOpenDependencies(@idlist); + if (scalar @dependencies > 0) { + ThrowUserError("still_unresolved_bugs", + { dependencies => \@dependencies, + dependency_count => scalar @dependencies }); + } + } + # Check here, because its the only place we require the resolution CheckFormField(\%::FORM, 'resolution', \@::settable_resolution); ChangeStatus('RESOLVED'); -- cgit v1.2.3-24-g4f1b