From: Don Armstrong Date: Mon, 27 Feb 2012 23:54:18 +0000 (-0800) Subject: note that a bug is done in the transcript; bail out earlier for merged bugs X-Git-Tag: release/2.6.0~415^2~9 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=c34e2dfd6be5dc133e33e60667130dcbc26280fe note that a bug is done in the transcript; bail out earlier for merged bugs --- diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index e5a1dd2..f5ed9be 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -921,6 +921,15 @@ sub set_done { my %submitter_notified; my $requester_notified = 0; my $orig_report_set = 0; + for my $data (@data) { + if (exists $data->{done} and + defined $data->{done} and + length $data->{done}) { + print {$transcript} "Bug $data->{bug_num} is already marked as done; not doing anything.\n"; + __end_control(%info); + return; + } + } for my $data (@data) { my $old_data = dclone($data); my $hash = get_hashname($data->{bug_num}); @@ -939,13 +948,6 @@ sub set_done { $orig_report_set = 1; } - if (exists $data->{done} and - defined $data->{done} and - length $data->{done}) { - print {$transcript} "Bug $data->{bug_num} is already marked as done; not doing anything.\n"; - __end_control(%info); - return; - } $action = "Marked $config{bug} as done"; # set done to the requester @@ -962,6 +964,7 @@ sub set_done { ) if not exists $param{append_log} or $param{append_log}; writebug($data->{bug_num},$data); + print {$transcript} "$action\n"; # get the original report if ($param{notify_submitter}) { my $submitter_message;