From 770e77bbbc9b2294ec03f7ff0f23865fb9845a7d Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" Date: Wed, 16 Feb 2005 16:50:38 +0000 Subject: [PATCH] Bug 281411 : The "Remaining Time" value should not be negative for too large "Hours Worked" values Patch by Frederic Buclin r=wurblzap a=myk git-svn-id: svn://10.0.0.236/trunk@169259 18797224-902f-48f8-a5cc-f745e15eee43 --- .../webtools/bugzilla/template/en/default/bug/edit.html.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl index 613bfb4d4be..4514350bcc0 100644 --- a/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl +++ b/mozilla/webtools/bugzilla/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;