From: travis%sedsystems.ca <> Date: Thu, 17 Feb 2005 00:50:38 +0000 (+0000) Subject: Bug 281411 : The "Remaining Time" value should not be negative for too large "Hours... X-Git-Tag: bugzilla-2.19.3~309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db56c51ee6520dc23de5cdde41e3d2e1fcf4a3bf;p=thirdparty%2Fbugzilla.git Bug 281411 : The "Remaining Time" value should not be negative for too large "Hours Worked" values Patch by Frederic Buclin r=wurblzap a=myk --- diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 613bfb4d4b..4514350bcc 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;