Changing the estimated_time size
Julien BÉTI
beti at fimasys.fr
Fri Jul 27 12:16:28 UTC 2007
Hello,
-1- Why ?
-2- What we've done
-3- The problem
--------------
-1- Why ?
We're using Bugzilla to manage all processes around software
development, and we have meta-tasks to define "Bundles", where we're
using the estimated_time to ... estimate the time required to specify,
develop, test and release it. Those "Bundles" can be quite huge, and we
would like to enter more than 99999.99 hours.
-2- What we've done
I made the following successful alter on Bugzilla database:
alter table bugs change estimated_time estimated_time decimal(7,2);
And I made the following changes in the code (plus some template changes
for client-side validation):
--- ./Bugzilla/DB/Schema.pm.org 2007-07-27 10:38:41.000000000 +0200
+++ ./Bugzilla/DB/Schema.pm 2007-07-27 10:39:01.000000000 +0200
@@ -193,7 +193,7 @@
NOTNULL => 1, DEFAULT => 'TRUE'},
cclist_accessible => {TYPE => 'BOOLEAN',
NOTNULL => 1, DEFAULT => 'TRUE'},
- estimated_time => {TYPE => 'decimal(5,2)',
+ estimated_time => {TYPE => 'decimal(7,2)',
NOTNULL => 1, DEFAULT => '0'},
remaining_time => {TYPE => 'decimal(5,2)',
NOTNULL => 1, DEFAULT => '0'},
--- ./Bugzilla/Bug.pm.org 2007-07-25 18:39:07.000000000 +0200
+++ ./Bugzilla/Bug.pm 2007-07-25 18:39:26.000000000 +0200
@@ -780,9 +780,9 @@
{field => "$field", num => "$time", min_num =>
"0"});
}
- if ($time > 99999.99) {
+ if ($time > 9999999.99) {
ThrowUserError("number_too_large",
- {field => "$field", num => "$time", max_num =>
"99999.99"});
+ {field => "$field", num => "$time", max_num =>
"9999999.99"});
}
}
--- ./checksetup.pl.org 2007-07-27 10:37:31.000000000 +0200
+++ ./checksetup.pl 2007-07-27 10:37:58.000000000 +0200
@@ -2800,7 +2800,7 @@
$dbh->bz_add_column("longdescs", "work_time",
{TYPE => 'decimal(5,2)', NOTNULL => 1, DEFAULT =>
'0'});
$dbh->bz_add_column("bugs", "estimated_time",
- {TYPE => 'decimal(5,2)', NOTNULL => 1, DEFAULT =>
'0'});
+ {TYPE => 'decimal(7,2)', NOTNULL => 1, DEFAULT =>
'0'});
$dbh->bz_add_column("bugs", "remaining_time",
{TYPE => 'decimal(5,2)', NOTNULL => 1, DEFAULT =>
'0'});
$dbh->bz_add_column("bugs", "deadline", {TYPE => 'DATETIME'});
-3- The problem
After those changes, when I input 9999999.99 in estimated_time in bug
edition and clic Commit, I do not have any error message but the
recorded value is 99999.99 :(
I made some search in the code, but I still did not find where the value
is truncated.
Any advise would be much appreciated.
Best regards,
Julien BETI - Fimasys.
More information about the developers
mailing list