summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xBug.pm18
-rwxr-xr-xBugzilla/Bug.pm18
-rw-r--r--Bugzilla/Template.pm2
-rw-r--r--template/en/default/bug/edit.html.tmpl7
4 files changed, 43 insertions, 2 deletions
diff --git a/Bug.pm b/Bug.pm
index b451190e2..9e8e44c55 100755
--- a/Bug.pm
+++ b/Bug.pm
@@ -262,6 +262,24 @@ sub initBug {
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 {
my ($self) = @_;
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index b451190e2..9e8e44c55 100755
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -262,6 +262,24 @@ sub initBug {
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 {
my ($self) = @_;
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 463247c86..e596af226 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -217,7 +217,7 @@ sub create {
my ($context, $bug) = @_;
return sub {
my $text = shift;
- return &::GetBugLink($text, $bug);
+ return &::GetBugLink($bug, $text);
};
},
1
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl
index 2d9306256..6d512e1fd 100644
--- a/template/en/default/bug/edit.html.tmpl
+++ b/template/en/default/bug/edit.html.tmpl
@@ -160,7 +160,12 @@
<a href="bug_status.html">Resolution</a>:
</b>
</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 align="right">