]> 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:09:10 +0000 (10:09 +0000)
committerkiko%async.com.br <>
Thu, 29 Jul 2004 10:09:10 +0000 (10:09 +0000)
errors. Check if the time values haven't actually changed by using                     integer comparison (instead of string comparison). r=jouni, a=justdave.

process_bug.cgi

index 93d90c996865aa07ce30696a66a78763707b5869..c0e6e13a6c142b0c1998b19ca18f8c2630278858 100755 (executable)
@@ -361,14 +361,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 
@@ -1150,6 +1156,7 @@ foreach my $id (@idlist) {
         }
         $i++;
     }
+
     $oldhash{'product'} = get_product_name($oldhash{'product_id'});
     if (!CanEditProductId($oldhash{'product_id'})) {
         ThrowUserError("product_edit_denied",