From: Fabrice Bellingard Date: Mon, 6 Feb 2012 17:04:39 +0000 (+0100) Subject: SONAR-3223 Err. in review search if result ties to a deleted resource X-Git-Tag: 2.14~167 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6a174837516ec2457f881e30c2cd4ee3468455cb;p=sonarqube.git SONAR-3223 Err. in review search if result ties to a deleted resource --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb index 2b4e3edd658..14e22c06400 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project_reviews/_review.html.erb @@ -123,7 +123,11 @@ <%= qualifier_icon(review.resource) -%> <% if !review.on_project? %> <%= review.project.long_name -%> <%= image_tag 'sep12.png' -%> <% end %> - <%= link_to_resource(review.resource, review.resource.long_name, {:tab => :violations, :rule => review.false_positive ? "false_positive_reviews" : ""}) %> + <% if review.rule_failure && review.rule_failure.snapshot %> + <%= link_to_resource(review.resource, review.resource.long_name, {:tab => :violations, :rule => review.false_positive ? "false_positive_reviews" : ""}) %> + <% else %> + <%= review.resource.long_name -%> + <% end %> @@ -134,6 +138,7 @@ <% end %> + <% if review.rule_failure || !review.comments.empty? %>
<% if review.rule_failure %>
@@ -182,8 +187,9 @@
<% end %>
+ <% end %> - <% if current_user %> + <% if current_user && !review.closed? %> <%= button_to_remote message('reviews.comment'), { :url => {:controller => "project_reviews", :action => "comment_form", :id => review.id}, diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_list.html.erb index d41b13667bf..11d75bcb534 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_list.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_list.html.erb @@ -59,7 +59,7 @@ <%= review.project.name -%>
- <%= review.resource.name -%> + <%= review.resource.name if review.resource -%> <%= review.assignee ? h(review.assignee.name) : '-' -%> <%= distance_of_time_in_words_to_now(review.updated_at) -%>