]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 281411 : The "Remaining Time" value should not be negative for too large "Hours...
authortravis%sedsystems.ca <>
Fri, 18 Feb 2005 14:18:27 +0000 (14:18 +0000)
committertravis%sedsystems.ca <>
Fri, 18 Feb 2005 14:18:27 +0000 (14:18 +0000)
Patch by Frederic Buclin <LpSolit@gmail.com>   r=wurblzap  a=justdave

template/en/default/bug/edit.html.tmpl

index 35344c88dd4c8881a3013b7f0d631a09c1420176..fda1826964e5013baab45377619b908259e9ea95 100644 (file)
@@ -97,8 +97,9 @@
      // subtracts time spent from remaining time
      var new_time;
 
+     // prevent negative values if work_time > fRemainingTime
      new_time =
-        fRemainingTime - document.changeform.work_time.value;
+        Math.max(fRemainingTime - document.changeform.work_time.value, 0.0);
      // get upto 2 decimal places
      document.changeform.remaining_time.value =
           Math.round(new_time * 100)/100;