Bug 24789 [E|A|R] Add Estimated, Actual, Remaining Time Fields

patch by jeff.hedlund@matrixsi.com
2xr=joel,justdave


git-svn-id: svn://10.0.0.236/trunk@131895 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bugreport%peshkin.net
2002-10-13 04:26:24 +00:00
parent 6472e40a8c
commit 6d78654972
22 changed files with 609 additions and 72 deletions

View File

@@ -233,7 +233,8 @@ if ($::FORM{'keywords'} && UserInGroup("editbugs")) {
# Build up SQL string to add bug.
my $sql = "INSERT INTO bugs " .
"(" . join(",", @used_fields) . ", reporter, creation_ts) " .
"(" . join(",", @used_fields) . ", reporter, creation_ts, " .
"estimated_time, remaining_time) " .
"VALUES (";
foreach my $field (@used_fields) {
@@ -246,7 +247,23 @@ $comment = trim($comment);
# OK except for the fact that it causes e-mail to be suppressed.
$comment = $comment ? $comment : " ";
$sql .= "$::userid, now() )";
$sql .= "$::userid, now(), ";
# Time Tracking
if (UserInGroup(Param("timetrackinggroup")) &&
defined $::FORM{'estimated_time'}) {
my $est_time = $::FORM{'estimated_time'};
if ($est_time =~ /^(?:\d+(?:\.\d*)?|\.\d+)$/) {
$sql .= SqlQuote($est_time) . "," . SqlQuote($est_time);
} else {
$vars->{'field'} = "estimated_time";
ThrowUserError("need_positive_number");
}
} else {
$sql .= "0, 0";
}
$sql .= ")";
# Groups
my @groupstoadd = ();