summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkl%redhat.com <>2009-01-28 05:12:41 +0100
committerdkl%redhat.com <>2009-01-28 05:12:41 +0100
commit70f22ae49bfee300a79aece56ca72cb319b786a5 (patch)
tree233848750ec210a553eec792c50840adea5c5574
parent51c5d9a1e6fb1d52b2932462fa1745221f003652 (diff)
downloadbugzilla-70f22ae49bfee300a79aece56ca72cb319b786a5.tar.gz
bugzilla-70f22ae49bfee300a79aece56ca72cb319b786a5.tar.xz
Bug 470262 - Show alias if available in show_bug.cgi for bug dependencies, otherwise show bug id
Mistakenly checked in previous version of patch. This brings the changes up to date with the approved patch. dkl
-rw-r--r--Bugzilla/Template.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 4c5f05662..03a9df827 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -323,13 +323,13 @@ sub get_bug_link {
my $quote_bug_num = html_quote($bug_num);
detaint_natural($bug_num) || return "&lt;invalid bug number: $quote_bug_num&gt;";
- my $bug = Bugzilla::Bug->new($bug_num);
- my $bug_state = $bug->bug_status;
- my $bug_res = $bug->resolution;
- my $bug_desc = $bug->short_desc;
+ my ($bug_alias, $bug_state, $bug_res, $bug_desc) =
+ $dbh->selectrow_array('SELECT bugs.alias, bugs.bug_status, bugs.resolution, bugs.short_desc
+ FROM bugs WHERE bugs.bug_id = ?',
+ undef, $bug_num);
- if ($options->{use_alias} && $bug->alias) {
- $link_text = $bug->alias;
+ if ($options->{use_alias} && $link_text =~ /^\d+$/ && $bug_alias) {
+ $link_text = $bug_alias;
}
if ($bug_state) {