Commit bbb41a57 authored by burnus%gmx.de's avatar burnus%gmx.de

Bug 71790 - Duplicate resolution field should include bug number of original

r=bbaetz,a=justdave
parent 1b071f06
...@@ -262,6 +262,24 @@ sub initBug { ...@@ -262,6 +262,24 @@ sub initBug {
return $self; return $self;
} }
sub dup_id {
my ($self) = @_;
return $self->{'dup_id'} if exists $self->{'dup_id'};
$self->{'dup_id'} = undef;
if ($self->{'resolution'} eq 'DUPLICATE') {
my $dbh = Bugzilla->dbh;
$self->{'dup_id'} =
$dbh->selectrow_array(q{SELECT dupe_of
FROM duplicates
WHERE dupe = ?},
undef,
$self->{'bug_id'});
}
return $self->{'dup_id'};
}
sub actual_time { sub actual_time {
my ($self) = @_; my ($self) = @_;
......
...@@ -262,6 +262,24 @@ sub initBug { ...@@ -262,6 +262,24 @@ sub initBug {
return $self; return $self;
} }
sub dup_id {
my ($self) = @_;
return $self->{'dup_id'} if exists $self->{'dup_id'};
$self->{'dup_id'} = undef;
if ($self->{'resolution'} eq 'DUPLICATE') {
my $dbh = Bugzilla->dbh;
$self->{'dup_id'} =
$dbh->selectrow_array(q{SELECT dupe_of
FROM duplicates
WHERE dupe = ?},
undef,
$self->{'bug_id'});
}
return $self->{'dup_id'};
}
sub actual_time { sub actual_time {
my ($self) = @_; my ($self) = @_;
......
...@@ -217,7 +217,7 @@ sub create { ...@@ -217,7 +217,7 @@ sub create {
my ($context, $bug) = @_; my ($context, $bug) = @_;
return sub { return sub {
my $text = shift; my $text = shift;
return &::GetBugLink($text, $bug); return &::GetBugLink($bug, $text);
}; };
}, },
1 1
......
...@@ -160,7 +160,12 @@ ...@@ -160,7 +160,12 @@
<a href="bug_status.html">Resolution</a>: <a href="bug_status.html">Resolution</a>:
</b> </b>
</td> </td>
<td>[% bug.resolution FILTER html %]</td> <td>
[% bug.resolution FILTER html %]
[% IF bug.resolution == "DUPLICATE" %]
of [% "bug ${bug.dup_id}" FILTER bug_link(bug.dup_id) %]
[% END %]
</td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td align="right"> <td align="right">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment