From: justdave%syndicomm.com <> Date: Sun, 9 Nov 2003 11:56:32 +0000 (+0000) Subject: Bug 95430: Reopening bugs from the "change several bugs at once" page did not work. X-Git-Tag: bugzilla-2.16.5~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8559121ef5a06283167a4ccb7207236802883c6e;p=thirdparty%2Fbugzilla.git Bug 95430: Reopening bugs from the "change several bugs at once" page did not work. r= myk, a= justdave --- diff --git a/process_bug.cgi b/process_bug.cgi index 205b3f3663..939e632360 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -657,12 +657,8 @@ SWITCH: for ($::FORM{'knob'}) { last SWITCH; }; /^reopen$/ && CheckonComment( "reopen" ) && do { - SendSQL("SELECT resolution FROM bugs WHERE bug_id = $::FORM{'id'}"); ChangeStatus('REOPENED'); ChangeResolution(''); - if (FetchOneColumn() eq 'DUPLICATE') { - SendSQL("DELETE FROM duplicates WHERE dupe = $::FORM{'id'}"); - } last SWITCH; }; /^verify$/ && CheckonComment( "verify" ) && do { @@ -850,7 +846,7 @@ foreach my $id (@idlist) { my $write = "WRITE"; # Might want to make a param to control # whether we do LOW_PRIORITY ... SendSQL("LOCK TABLES bugs $write, bugs_activity $write, cc $write, " . - "cc AS selectVisible_cc $write, " . + "cc AS selectVisible_cc $write, duplicates $write, " . "profiles $write, dependencies $write, votes $write, " . "keywords $write, longdescs $write, fielddefs $write, " . "keyworddefs READ, groups READ, attachments READ, products READ"); @@ -1030,6 +1026,13 @@ foreach my $id (@idlist) { if ($::comma ne "") { SendSQL($query); } + # Check for duplicates if the bug is [re]open + SendSQL("SELECT resolution FROM bugs WHERE bug_id = $id"); + my $resolution = FetchOneColumn(); + if ($resolution eq '') { + SendSQL("DELETE FROM duplicates WHERE dupe = $id"); + } + SendSQL("select now()"); $timestamp = FetchOneColumn();