summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-02-17 01:50:38 +0100
committertravis%sedsystems.ca <>2005-02-17 01:50:38 +0100
commitdb56c51ee6520dc23de5cdde41e3d2e1fcf4a3bf (patch)
tree589bd9581b95844b1aadddbd5c5e3e2aa3488fb1 /template/en
parent97d976961aaabcebd5307edab9de31213b265087 (diff)
downloadbugzilla-db56c51ee6520dc23de5cdde41e3d2e1fcf4a3bf.tar.gz
bugzilla-db56c51ee6520dc23de5cdde41e3d2e1fcf4a3bf.tar.xz
Bug 281411 : The "Remaining Time" value should not be negative for too large "Hours Worked" values
Patch by Frederic Buclin <LpSolit@gmail.com> r=wurblzap a=myk
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/bug/edit.html.tmpl3
1 files changed, 2 insertions, 1 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 613bfb4d4..4514350bc 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -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;