# HG changeset patch # User Marcin Kuzminski # Date 2016-10-07 17:38:51 # Node ID cde81eb193a0c4344af6089f8846be0b4cfcc03b # Parent eb62cf1fa2f69a529acf41a0df26166251dadff9 default-reviewers: add reason when manually adding reviewers after creating a PR. Fixes #4250 diff --git a/rhodecode/public/js/src/rhodecode/pullrequests.js b/rhodecode/public/js/src/rhodecode/pullrequests.js --- a/rhodecode/public/js/src/rhodecode/pullrequests.js +++ b/rhodecode/public/js/src/rhodecode/pullrequests.js @@ -209,8 +209,10 @@ var ReviewerAutoComplete = function(inpu formatResult: autocompleteFormatResult, lookupFilter: autocompleteFilterResult, onSelect: function(suggestion, data){ + var msg = _gettext('added manually by "{0}"'); + var reasons = [msg.format(templateContext.rhodecode_user.username)]; addReviewMember(data.id, data.first_name, data.last_name, - data.username, data.icon_link); + data.username, data.icon_link, reasons); $('#'+input_id).val(''); } }); diff --git a/rhodecode/templates/base/root.html b/rhodecode/templates/base/root.html --- a/rhodecode/templates/base/root.html +++ b/rhodecode/templates/base/root.html @@ -12,6 +12,8 @@ if getattr(c, 'rhodecode_user', None) an c.template_context['rhodecode_user']['username'] = c.rhodecode_user.username c.template_context['rhodecode_user']['email'] = c.rhodecode_user.email c.template_context['rhodecode_user']['notification_status'] = c.rhodecode_user.get_instance().user_data.get('notification_status', True) + c.template_context['rhodecode_user']['first_name'] = c.rhodecode_user.name + c.template_context['rhodecode_user']['last_name'] = c.rhodecode_user.lastname c.template_context['visual']['default_renderer'] = h.get_visual_attr(c, 'default_renderer') %>