summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi15
1 files changed, 12 insertions, 3 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 27f870e13..b51e24db5 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -325,7 +325,7 @@ if (UserInGroup("editbugs") && defined($::FORM{'dependson'})) {
# Build up SQL string to add bug.
my $sql = "INSERT INTO bugs " .
"(" . join(",", @used_fields) . ", reporter, creation_ts, " .
- "estimated_time, remaining_time) " .
+ "estimated_time, remaining_time, deadline) " .
"VALUES (";
foreach my $field (@used_fields) {
@@ -346,10 +346,19 @@ if (UserInGroup(Param("timetrackinggroup")) &&
my $est_time = $::FORM{'estimated_time'};
Bugzilla::Bug::ValidateTime($est_time, 'estimated_time');
- $sql .= SqlQuote($est_time) . "," . SqlQuote($est_time);
+ $sql .= SqlQuote($est_time) . "," . SqlQuote($est_time) . ",";
} else {
- $sql .= "0, 0";
+ $sql .= "0, 0, ";
}
+
+if ((UserInGroup(Param("timetrackinggroup"))) && ($::FORM{'deadline'})) {
+ Bugzilla::Util::ValidateDate($::FORM{'deadline'}, 'YYYY-MM-DD');
+ my $str = $::FORM{'deadline'};
+ $sql .= SqlQuote($::FORM{'deadline'});
+} else {
+ $sql .= "NULL";
+}
+
$sql .= ")";
# Groups