This feature is already in the Review Board 1.1 alpha releases.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Thu, Dec 24, 2009 at 11:51 PM, Chen Yufei <cyfde...@gmail.com> wrote:

> When selecting reviewers, the auto complete drop down list is helpful.
> However, I and my colleagues think think that showing the user's full
> name will be more helpful.
>
> This is not difficult to do, here's my quick and dirty implementation,
> patch to release-1.0.5.1
>
> diff --git a/reviewboard/htdocs/media/rb/js/reviews.js b/reviewboard/
> htdocs/media/rb/js/reviews.js
> index f02b6e4..033e7a7 100644
> --- a/reviewboard/htdocs/media/rb/js/reviews.js
> +++ b/reviewboard/htdocs/media/rb/js/reviews.js
> @@ -285,6 +285,16 @@ $.fn.reviewsAutoComplete = function(fieldName,
> nameKey) {
>         $(this)
>             .autocomplete({
>                 formatItem: function(data) {
> +                    // Maybe this is not the best place to modify
> +                    if (fieldName == "users") {
> +                         return data["username"] + " (" + data
> ["fullname"] + ")";
> +                    }
> +                    return data[nameKey];
> +                },
> +                formatResult: function(data) {
> +                    if (fieldName == "users") {
> +                        return data["username"];
> +                    }
>                     return data[nameKey];
>                 },
>                 matchCase: false,
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to