]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5123 Display name instead of login for comment author (if available)
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 8 Apr 2014 10:11:11 +0000 (12:11 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 8 Apr 2014 10:17:07 +0000 (12:17 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb

index 05ada28c9a7731442e64a15977a96cc8ccefb82d..15719704de4278f3f03091bbe6f3a61f04485f3d 100644 (file)
         <td>
           <a class="rule-modal" href="#" onclick="return openModalWindow('<%= url_for :controller => 'issue', :action => 'show', :id => issue.key, :modal => true -%>', {'width': 800})">
             <%= h truncate(issue.message, :length => 100) -%></a>
-          <% if last_comment %>
+          <% if last_comment && last_comment.userLogin() %>
             <div class="comment-excerpt">
               <img src="<%= ApplicationController.root_context -%>/images/reviews/comment.png"/>
-              &nbsp;<b><%= last_comment.userLogin() -%> :</b>
+              <% commentAuthor = results.user(last_comment.userLogin()) %>
+              &nbsp;<b><%= h( commentAuthor.nil? ? last_comment.userLogin() : commentAuthor.name() ) -%> :</b>
               <%= Internal.text.markdownToHtml(last_comment.markdownText) -%>
             </div>
           <% end %>