summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorburnus%gmx.de <>2003-04-09 18:29:15 +0200
committerburnus%gmx.de <>2003-04-09 18:29:15 +0200
commitbbb41a57d19d5e395e92c42d9852357f56e76635 (patch)
tree2bf74d97672cc239f3d5fb69aaa3d692966277e7
parent1b071f06dee3e09e8316feadecc0625ed47f01a8 (diff)
downloadbugzilla-bbb41a57d19d5e395e92c42d9852357f56e76635.tar.gz
bugzilla-bbb41a57d19d5e395e92c42d9852357f56e76635.tar.xz
Bug 71790 - Duplicate resolution field should include bug number of original
r=bbaetz,a=justdave
-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">