From: lpsolit%gmail.com <> Date: Mon, 10 Apr 2006 01:33:34 +0000 (+0000) Subject: Bug 332705: Taking a bug when posting a new attachment doesn't update the 'duplicates... X-Git-Tag: bugzilla-2.20.2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e810945bb84682854f0e6e12c8db09257ede6ec;p=thirdparty%2Fbugzilla.git Bug 332705: Taking a bug when posting a new attachment doesn't update the 'duplicates' table - Patch by Frédéric Buclin r=wicked a=justdave --- diff --git a/attachment.cgi b/attachment.cgi index b8890ac03c..64bec6e5ae 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -1023,7 +1023,11 @@ sub insert SendSQL("UPDATE bugs SET delta_ts = $sql_timestamp, " . join(", ", map("$fields[$_] = $newvalues[$_]", (0..3))) . " WHERE bug_id = $bugid"); - + + # If the bug was a dupe, we have to remove its entry from the + # 'duplicates' table. + $dbh->do('DELETE FROM duplicates WHERE dupe = ?', undef, $bugid); + # We store email addresses in the bugs_activity table rather than IDs. $oldvalues[0] = $oldvalues[4]; $newvalues[0] = $newvalues[4];