From fdcb2002d65a5d60614e322d09a8e91163fe9783 Mon Sep 17 00:00:00 2001 From: "kiko%async.com.br" Date: Mon, 4 Nov 2002 00:57:56 +0000 Subject: [PATCH] Fix for bug 62729, "Add real name capability to bug_list.cgi". Patch by Toms Baugis, r=kiko, 2xr=joel. --- webtools/bugzilla/Bugzilla/Search.pm | 9 ++++++--- webtools/bugzilla/buglist.cgi | 3 +++ webtools/bugzilla/colchange.cgi | 4 +++- .../template/en/default/list/change-columns.html.tmpl | 3 +++ .../bugzilla/template/en/default/list/table.html.tmpl | 3 +++ 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/webtools/bugzilla/Bugzilla/Search.pm b/webtools/bugzilla/Bugzilla/Search.pm index 38f19c616171..2360d95e4d60 100644 --- a/webtools/bugzilla/Bugzilla/Search.pm +++ b/webtools/bugzilla/Bugzilla/Search.pm @@ -69,17 +69,20 @@ sub init { my @andlist; # First, deal with all the old hard-coded non-chart-based poop. - if (lsearch($fieldsref, 'map_assigned_to.login_name') >= 0) { + if (lsearch($fieldsref, 'map_assigned_to.login_name') >= 0 || + lsearch($fieldsref, 'map_assigned_to.realname') >= 0) { push @supptables, "profiles AS map_assigned_to"; push @wherepart, "bugs.assigned_to = map_assigned_to.userid"; } - if (lsearch($fieldsref, 'map_reporter.login_name') >= 0) { + if (lsearch($fieldsref, 'map_reporter.login_name') >= 0 || + lsearch($fieldsref, 'map_reporter.realname') >= 0) { push @supptables, "profiles AS map_reporter"; push @wherepart, "bugs.reporter = map_reporter.userid"; } - if (lsearch($fieldsref, 'map_qa_contact.login_name') >= 0) { + if (lsearch($fieldsref, 'map_qa_contact.login_name') >= 0 || + lsearch($fieldsref, 'map_qa_contact.realname') >= 0) { push @supptables, "LEFT JOIN profiles map_qa_contact ON bugs.qa_contact = map_qa_contact.userid"; } diff --git a/webtools/bugzilla/buglist.cgi b/webtools/bugzilla/buglist.cgi index 905d52d63b94..1f91bd32201c 100755 --- a/webtools/bugzilla/buglist.cgi +++ b/webtools/bugzilla/buglist.cgi @@ -370,8 +370,11 @@ DefineColumn("severity" , "bugs.bug_severity" , "Severity" DefineColumn("priority" , "bugs.priority" , "Priority" ); DefineColumn("platform" , "bugs.rep_platform" , "Platform" ); DefineColumn("owner" , "map_assigned_to.login_name" , "Owner" ); +DefineColumn("owner_realname" , "map_assigned_to.realname" , "Owner" ); DefineColumn("reporter" , "map_reporter.login_name" , "Reporter" ); +DefineColumn("reporter_realname" , "map_reporter.realname" , "Reporter" ); DefineColumn("qa_contact" , "map_qa_contact.login_name" , "QA Contact" ); +DefineColumn("qa_contact_realname", "map_qa_contact.realname" , "QA Contact" ); DefineColumn("status" , "bugs.bug_status" , "State" ); DefineColumn("resolution" , "bugs.resolution" , "Result" ); DefineColumn("summary" , "bugs.short_desc" , "Summary" ); diff --git a/webtools/bugzilla/colchange.cgi b/webtools/bugzilla/colchange.cgi index 3d1ea04761aa..2cdf4f630bb6 100755 --- a/webtools/bugzilla/colchange.cgi +++ b/webtools/bugzilla/colchange.cgi @@ -42,7 +42,8 @@ GetVersionTable(); # The master list not only says what fields are possible, but what order # they get displayed in. my @masterlist = ("opendate", "changeddate", "severity", "priority", - "platform", "owner", "reporter", "status", "resolution", + "platform", "owner", "owner_realname", "reporter", + "reporter_realname", "status", "resolution", "product", "component", "version", "os", "votes"); if (Param("usetargetmilestone")) { @@ -50,6 +51,7 @@ if (Param("usetargetmilestone")) { } if (Param("useqacontact")) { push(@masterlist, "qa_contact"); + push(@masterlist, "qa_contact_realname"); } if (Param("usestatuswhiteboard")) { push(@masterlist, "status_whiteboard"); diff --git a/webtools/bugzilla/template/en/default/list/change-columns.html.tmpl b/webtools/bugzilla/template/en/default/list/change-columns.html.tmpl index aae74d019afc..fbdc145a9800 100644 --- a/webtools/bugzilla/template/en/default/list/change-columns.html.tmpl +++ b/webtools/bugzilla/template/en/default/list/change-columns.html.tmpl @@ -34,7 +34,9 @@ "priority" => "Priority", "platform" => "Hardware", "owner" => "Owner", + "owner_realname" => "Owner Realname", "reporter" => "Reporter", + "reporter_realname" => "Reporter Realname", "status" => "Status", "resolution" => "Resolution", "product" => "Product", @@ -45,6 +47,7 @@ "keywords" => "Keywords", "target_milestone" => "Target", "qa_contact" => "QA Contact", + "qa_contact_realname" => "QA Contact Realname", "status_whiteboard" => "Whiteboard", "summary" => "Summary (first 60 characters)", "summaryfull" => "Full Summary" } %] diff --git a/webtools/bugzilla/template/en/default/list/table.html.tmpl b/webtools/bugzilla/template/en/default/list/table.html.tmpl index eb130896135f..8c79b5d405b0 100644 --- a/webtools/bugzilla/template/en/default/list/table.html.tmpl +++ b/webtools/bugzilla/template/en/default/list/table.html.tmpl @@ -38,8 +38,11 @@ "platform" => { maxlength => 3 , title => "Plt" } , "status" => { maxlength => 4 } , "reporter" => { maxlength => 30 , ellipsis => "..." } , + "reporter_realname" => { maxlength => 20 , ellipsis => "..." } , "owner" => { maxlength => 30 , ellipsis => "..." } , + "owner_realname" => { maxlength => 20 , ellipsis => "..." } , "qa_contact" => { maxlength => 30 , ellipsis => "..." , title => "QAContact" } , + "qa_contact_realname" => { maxlength => 20 , ellipsis => "..." , title => "QAContact" } , "resolution" => { maxlength => 4 } , "summary" => { maxlength => 60 , ellipsis => "..." , wrap => 1 } , "summaryfull" => { wrap => 1 } ,