diff options
author | lpsolit%gmail.com <> | 2007-07-28 19:47:55 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-07-28 19:47:55 +0200 |
commit | 5f030a6f4394c45fdf58029d2d4a509d8289424b (patch) | |
tree | 58932142dcf7b34bfadc870d8a7357829d6bed41 | |
parent | 737535fcbcfd91d7c15eab2f43386333af113797 (diff) | |
download | bugzilla-5f030a6f4394c45fdf58029d2d4a509d8289424b.tar.gz bugzilla-5f030a6f4394c45fdf58029d2d4a509d8289424b.tar.xz |
Bug 389916: The "remaining_time_zeroed" message is displayed even if none of the bugs being changed has its remaining time > 0 - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
-rwxr-xr-x | Bugzilla/Bug.pm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 4793c87da..5f37e9ff4 100755 --- a/Bugzilla/Bug.pm +++ b/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'}); } } } |