Bug 300456: [BUGZILLA] BugzillaMailHandler should say what a bug is a DUPLICATE *of*

Patch by Colin Ogilvie <colin.ogilvie@gmail.com>, r=mkanat
This commit is contained in:
mozilla%colinogilvie.co.uk 2005-07-28 23:46:11 +00:00
parent 03738e2557
commit 1043448eaf
2 changed files with 17 additions and 3 deletions

View File

@ -627,8 +627,19 @@ sub CheckForBugMail {
# up properly in the GotURI after FetchBug.
$event->{'target'} = $channel;
$self->say($event, $message);
$self->FetchBug($event, $bug_id, 'bug')
unless $said_bug{$channel . $bug_id};
my $bugids = "";
# Special case for "duplicate of messages"
if ($message =~ /DUPLICATE of bug (\d+)/) {
my $dup_id = $1;
$bugids = $dup_id unless $said_bug{$channel . $dup_id};
$said_bug{$channel . $dup_id} = 1;
}
if (! $said_bug{$channel . $bug_id}) {
$bugids = $bug_id . " " . $bugids;
}
if ($bugids ne '') {
$self->FetchBug($event, $bugids, 'bug');
}
$said_to{$channel} = 1;
$said_bug{$channel . $bug_id} = 1;
} # unless $said_to

View File

@ -452,7 +452,10 @@ sub generate_log ($) {
# If we didn't remove anything, only added something.
elsif (!$old) {
$line .= " set the $field field on bug"
. " $bug_info->{bug_id} to $new.";
. " $bug_info->{bug_id} to $new";
# Hack for "RESOLVED DUPLICATE" messages.
$line .= ' of bug ' . $bug_info->{dup_of} if exists $bug_info->{dup_of};
$line .= '.';
}
# If we didn't add anything, only removed something.
elsif (!$new) {