From 18f3c9f63f72ea6f10f69baf40fb66308255c22a Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Sat, 28 Jul 2007 12:47:55 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20389916:=20The=20"remaining=5Ftime=5Fzeroe?= =?UTF-8?q?d"=20message=20is=20displayed=20even=20if=20none=20of=20the=20b?= =?UTF-8?q?ugs=20being=20changed=20has=20its=20remaining=20time=20>=200=20?= =?UTF-8?q?-=20Patch=20by=20Fr=EF=BF=BD=EF=BF=BDd=EF=BF=BD=EF=BF=BDric=20B?= =?UTF-8?q?uclin=20=20r=3Dmkanat=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webtools/bugzilla/Bugzilla/Bug.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/webtools/bugzilla/Bugzilla/Bug.pm b/webtools/bugzilla/Bugzilla/Bug.pm index 4793c87da3a..5f37e9ff4bb 100644 --- a/webtools/bugzilla/Bugzilla/Bug.pm +++ b/webtools/bugzilla/Bugzilla/Bug.pm @@ -2003,8 +2003,13 @@ sub check_status_change_triggers { $vars->{DuplicateUserConfirm} = 1; # DUPLICATE bugs should have no time remaining. - $_->_zero_remaining_time() foreach @$bugs; - $vars->{'message'} = "remaining_time_zeroed"; + foreach my $bug (@$bugs) { + # Note that 0.00 is *true* for Perl! + next unless ($bug->remaining_time > 0); + $bug->_zero_remaining_time; + $vars->{'message'} = "remaining_time_zeroed" + if Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'}); + } } elsif ($action eq 'change_resolution' || !is_open_state($action)) { # don't resolve as fixed while still unresolved blocking bugs @@ -2038,8 +2043,11 @@ sub check_status_change_triggers { if ($action ne 'change_resolution') { foreach my $b (@$bugs) { if ($b->bug_status ne $action) { + # Note that 0.00 is *true* for Perl! + next unless ($b->remaining_time > 0); $b->_zero_remaining_time; - $vars->{'message'} = "remaining_time_zeroed"; + $vars->{'message'} = "remaining_time_zeroed" + if Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'}); } } }