diff --git a/kallithea/model/comment.py b/kallithea/model/comment.py --- a/kallithea/model/comment.py +++ b/kallithea/model/comment.py @@ -100,7 +100,7 @@ class ChangesetCommentsModel(BaseModel): recipients += [cs_author] email_kwargs = { 'status_change': status_change, - 'cs_comment_user': h.person(user, 'username_and_name'), + 'cs_comment_user': h.person(user, 'full_name_and_username'), 'cs_target_repo': h.canonical_url('summary_home', repo_name=repo.repo_name), 'cs_comment_url': comment_url, 'raw_id': revision, @@ -148,7 +148,7 @@ class ChangesetCommentsModel(BaseModel): 'status_change': status_change, 'closing_pr': closing_pr, 'pr_comment_url': comment_url, - 'pr_comment_user': h.person(user, 'username_and_name'), + 'pr_comment_user': h.person(user, 'full_name_and_username'), 'pr_target_repo': h.canonical_url('summary_home', repo_name=pull_request.other_repo.repo_name), 'repo_name': pull_request.other_repo.repo_name, diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -472,10 +472,6 @@ class User(Base, BaseModel): return [x.ip_addr for x in ret] @property - def username_and_name(self): - return '%s (%s %s)' % (self.username, self.firstname, self.lastname) - - @property def full_name(self): return '%s %s' % (self.firstname, self.lastname) @@ -485,6 +481,10 @@ class User(Base, BaseModel): if (self.firstname and self.lastname) else self.username) @property + def full_name_and_username(self): + return '%s (%s %s)' % (self.username, self.firstname, self.lastname) + + @property def full_contact(self): return '%s %s <%s>' % (self.firstname, self.lastname, self.email) diff --git a/kallithea/templates/changeset/changeset.html b/kallithea/templates/changeset/changeset.html --- a/kallithea/templates/changeset/changeset.html +++ b/kallithea/templates/changeset/changeset.html @@ -114,7 +114,7 @@ ${self.repo_context_bar('changelog', c.c