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 /Bugzilla | |
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
Diffstat (limited to 'Bugzilla')
-rwxr-xr-x | Bugzilla/Bug.pm | 18 | ||||
-rw-r--r-- | Bugzilla/Template.pm | 2 |
2 files changed, 19 insertions, 1 deletions
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 |