From 0ff25164065ef14334bad422cfc235e0c10c2dbb Mon Sep 17 00:00:00 2001 From: "kiko%async.com.br" <> Date: Thu, 29 Jul 2004 10:08:19 +0000 Subject: [PATCH] Fix for bug 216008: Time Tracking: default values cause change bug errors. Check if the time values haven't actually changed by using integer comparison (instead of string comparison). r=jouni, a218=justdave. --- process_bug.cgi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/process_bug.cgi b/process_bug.cgi index b69b3da271..d759aa8dbd 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -362,14 +362,20 @@ sub CheckCanChangeField { } } } - + # Return true if they haven't changed this field at all. if ($oldvalue eq $newvalue) { return 1; } elsif (trim($oldvalue) eq trim($newvalue)) { return 1; + # numeric fields need to be compared using == + } elsif (($field eq "estimated_time" || $field eq "remaining_time") && + $oldvalue == $newvalue) { + return 1; } + + # A resolution change is always accompanied by a status change. So, we # always OK resolution changes; if they really can't do this, we will @@ -1158,6 +1164,7 @@ foreach my $id (@idlist) { } $i++; } + $oldhash{'product'} = get_product_name($oldhash{'product_id'}); if (!CanEditProductId($oldhash{'product_id'})) { ThrowUserError("product_edit_denied", -- 2.47.2