Commit 0ea9d8ff authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 361842: When filing a bug with dependencies, delta_ts is not updated on…

Bug 361842: When filing a bug with dependencies, delta_ts is not updated on dependent bugs, preventing correct midair collision detection in these bugs - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=bkor a=LpSolit
parent 27b4f887
...@@ -303,17 +303,21 @@ sub create { ...@@ -303,17 +303,21 @@ sub create {
# Set up dependencies (blocked/dependson) # Set up dependencies (blocked/dependson)
my $sth_deps = $dbh->prepare( my $sth_deps = $dbh->prepare(
'INSERT INTO dependencies (blocked, dependson) VALUES (?, ?)'); 'INSERT INTO dependencies (blocked, dependson) VALUES (?, ?)');
my $sth_bug_time = $dbh->prepare('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?');
foreach my $depends_on_id (@$depends_on) { foreach my $depends_on_id (@$depends_on) {
$sth_deps->execute($bug->bug_id, $depends_on_id); $sth_deps->execute($bug->bug_id, $depends_on_id);
# Log the reverse action on the other bug. # Log the reverse action on the other bug.
LogActivityEntry($depends_on_id, 'blocked', '', $bug->bug_id, LogActivityEntry($depends_on_id, 'blocked', '', $bug->bug_id,
$bug->{reporter_id}, $timestamp); $bug->{reporter_id}, $timestamp);
$sth_bug_time->execute($timestamp, $depends_on_id);
} }
foreach my $blocked_id (@$blocked) { foreach my $blocked_id (@$blocked) {
$sth_deps->execute($blocked_id, $bug->bug_id); $sth_deps->execute($blocked_id, $bug->bug_id);
# Log the reverse action on the other bug. # Log the reverse action on the other bug.
LogActivityEntry($blocked_id, 'dependson', '', $bug->bug_id, LogActivityEntry($blocked_id, 'dependson', '', $bug->bug_id,
$bug->{reporter_id}, $timestamp); $bug->{reporter_id}, $timestamp);
$sth_bug_time->execute($timestamp, $blocked_id);
} }
# And insert the comment. We always insert a comment on bug creation, # And insert the comment. We always insert a comment on bug creation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment