]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 216008: Time Tracking: default values cause change bug
authorkiko%async.com.br <>
Thu, 29 Jul 2004 10:08:19 +0000 (10:08 +0000)
committerkiko%async.com.br <>
Thu, 29 Jul 2004 10:08:19 +0000 (10:08 +0000)
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

index b69b3da271626ff568d37a5eadf720e53191c5a6..d759aa8dbd731fd50bdaf78e4eb870fd17f6324a 100755 (executable)
@@ -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",