diff options
author | burnus%gmx.de <> | 2003-04-09 18:29:15 +0200 |
---|---|---|
committer | burnus%gmx.de <> | 2003-04-09 18:29:15 +0200 |
commit | bbb41a57d19d5e395e92c42d9852357f56e76635 (patch) | |
tree | 2bf74d97672cc239f3d5fb69aaa3d692966277e7 | |
parent | 1b071f06dee3e09e8316feadecc0625ed47f01a8 (diff) | |
download | bugzilla-bbb41a57d19d5e395e92c42d9852357f56e76635.tar.gz bugzilla-bbb41a57d19d5e395e92c42d9852357f56e76635.tar.xz |
Bug 71790 - Duplicate resolution field should include bug number of original
r=bbaetz,a=justdave
-rwxr-xr-x | Bug.pm | 18 | ||||
-rwxr-xr-x | Bugzilla/Bug.pm | 18 | ||||
-rw-r--r-- | Bugzilla/Template.pm | 2 | ||||
-rw-r--r-- | template/en/default/bug/edit.html.tmpl | 7 |
4 files changed, 43 insertions, 2 deletions
@@ -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> </td> <td align="right"> |