From: lpsolit%gmail.com <> Date: Mon, 10 Apr 2006 01:28:49 +0000 (+0000) Subject: Bug 332705: Taking a bug when posting a new attachment doesn't update the 'duplicates... X-Git-Tag: bugzilla-2.22~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854b5ff41747e65a7d628c61d3bb025b6b815750;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 973b8b528d..09cde402f2 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -1071,7 +1071,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];