diff --git a/webtools/bugzilla/bug_form.pl b/webtools/bugzilla/bug_form.pl index 735dd2f1d06..176c380354d 100644 --- a/webtools/bugzilla/bug_form.pl +++ b/webtools/bugzilla/bug_form.pl @@ -118,11 +118,8 @@ my $assignedtoid = $bug{'assigned_to'}; my $reporterid = $bug{'reporter'}; my $qacontactid = $bug{'qa_contact'}; - -$bug{'assigned_name'} = DBID_to_real_name($bug{'assigned_to'}); -$bug{'reporter_name'} = DBID_to_real_name($bug{'reporter'}); -$bug{'assigned_to'} = DBID_to_name($bug{'assigned_to'}); -$bug{'reporter'} = DBID_to_name($bug{'reporter'}); +$bug{'assigned_to'} = DBID_to_real_or_loginname($bug{'assigned_to'}); +$bug{'reporter'} = DBID_to_real_or_loginname($bug{'reporter'}); print qq{
\n}; @@ -186,7 +183,7 @@ print " OS: Reporter:$bug{'reporter'} $bug{'reporter_name'} + "Reporter:$bug{'reporter'} Status: $bug{'bug_status'} @@ -205,7 +202,7 @@ print " Assigned To: - $bug{'assigned_to'} $bug{'assigned_name'}"; + $bug{'assigned_to'}"; if (Param("usetargetmilestone")) { my $url = ""; @@ -431,6 +428,10 @@ if ($canedit || $::userid == $assignedtoid || Resolve bug, mark it as duplicate of bug #
\n"; $knum++; + if ( $bug{'assigned_to'} =~ /(.*)\((.*)\)/ ) { + $bug{'assigned_to'} = $1; + chop($bug{'assigned_to'}); + } my $assign_element = ""; print " diff --git a/webtools/bugzilla/globals.pl b/webtools/bugzilla/globals.pl index 948fa7feb69..32772df5650 100644 --- a/webtools/bugzilla/globals.pl +++ b/webtools/bugzilla/globals.pl @@ -546,14 +546,14 @@ sub InsertNewUser { return $password; } -sub DBID_to_real_name { +sub DBID_to_real_or_loginname { my ($id) = (@_); - SendSQL("SELECT realname FROM profiles WHERE userid = $id"); - my ($r) = FetchSQLData(); + SendSQL("SELECT login_name,realname FROM profiles WHERE userid = $id"); + my ($l, $r) = FetchSQLData(); if ($r eq "") { - return; + return $l; } else { - return "($r)"; + return "$l ($r)"; } }