diff options
author | jocuri%softhome.net <> | 2005-01-16 22:36:02 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2005-01-16 22:36:02 +0100 |
commit | c1a8053e98fa659ffda19fae799423c1762dbd10 (patch) | |
tree | 73c2a248c499ee3b7a811d3dbca07c14078e3069 /post_bug.cgi | |
parent | ce3c5ed7f0c8c4426b3717c169674edfe7a16556 (diff) | |
download | bugzilla-c1a8053e98fa659ffda19fae799423c1762dbd10.tar.gz bugzilla-c1a8053e98fa659ffda19fae799423c1762dbd10.tar.xz |
Patch for bug 103636: Support specifying a date on which a bug is expected to be resolved; patch by Alexandre Michetti Manduca <michetti@grad.icmc.usp.br>, r=jouni, a=myk.
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-x | post_bug.cgi | 15 |
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 |