summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/bug')
-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;