summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-01-29 04:01:27 +0100
committertravis%sedsystems.ca <>2005-01-29 04:01:27 +0100
commited20d719e2df695ed2c9127f364886b902d82a24 (patch)
tree78e3a5205b856822753ff44d7e49f6b967b1d86d /post_bug.cgi
parentfc649d472490ea13b935eccf1ecd692dd7112fd4 (diff)
downloadbugzilla-ed20d719e2df695ed2c9127f364886b902d82a24.tar.gz
bugzilla-ed20d719e2df695ed2c9127f364886b902d82a24.tar.xz
Bug 257315 : type of delta_ts in bugs table should not be timestamp
Patch by Tomas Kopal <Tomas.Kopal@altap.cz> r=vladd, LpSolit a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi16
1 files changed, 9 insertions, 7 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 40111ff77..112292171 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -321,9 +321,14 @@ if (UserInGroup("editbugs") && defined($::FORM{'dependson'})) {
}
}
+# get current time
+SendSQL("SELECT NOW()");
+my $timestamp = FetchOneColumn();
+
+
# Build up SQL string to add bug.
my $sql = "INSERT INTO bugs " .
- "(" . join(",", @used_fields) . ", reporter, creation_ts, " .
+ "(" . join(",", @used_fields) . ", reporter, creation_ts, delta_ts, " .
"estimated_time, remaining_time, deadline) " .
"VALUES (";
@@ -337,7 +342,7 @@ $comment = trim($comment);
# OK except for the fact that it causes e-mail to be suppressed.
$comment = $comment ? $comment : " ";
-$sql .= "$::userid, now(), ";
+$sql .= "$::userid, $timestamp, $timestamp, ";
# Time Tracking
if (UserInGroup(Param("timetrackinggroup")) &&
@@ -414,9 +419,6 @@ while (MoreSQLData()) {
# Add the bug report to the DB.
SendSQL($sql);
-SendSQL("select now()");
-my $timestamp = FetchOneColumn();
-
# Get the bug ID back.
SendSQL("select LAST_INSERT_ID()");
my $id = FetchOneColumn();
@@ -456,8 +458,8 @@ if (UserInGroup("editbugs")) {
while (MoreSQLData()) {
push (@list, FetchOneColumn());
}
- SendSQL("UPDATE bugs SET keywords = " .
- SqlQuote(join(', ', @list)) .
+ SendSQL("UPDATE bugs SET delta_ts = $timestamp," .
+ " keywords = " . SqlQuote(join(', ', @list)) .
" WHERE bug_id = $id");
}
if (defined $::FORM{'dependson'}) {