From c1a8053e98fa659ffda19fae799423c1762dbd10 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Sun, 16 Jan 2005 21:36:02 +0000 Subject: Patch for bug 103636: Support specifying a date on which a bug is expected to be resolved; patch by Alexandre Michetti Manduca , r=jouni, a=myk. --- post_bug.cgi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'post_bug.cgi') 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 -- cgit v1.2.3-24-g4f1b