]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2973 do not display the previous severity
authorSimon Brandhof <simon.brandhof@gmail.com>
Thu, 22 Dec 2011 18:53:50 +0000 (19:53 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 22 Dec 2011 18:53:50 +0000 (19:53 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb

index e49e5c0287ae814094f00a21a60b178b8e6a126f..5c02d39df2ae90c9f4b05643d4dce99e12837495 100644 (file)
@@ -9,7 +9,11 @@
         </div>
       <% end %>
 
-      <img src="<%= ApplicationController.root_context -%>/images/priority/<%= violation.failure_level -%>.png">
+      <% if violation.review && violation.review.manual_severity && violation.review.severity!=violation.severity %>
+        <img src="<%= ApplicationController.root_context -%>/images/priority/<%= violation.review.severity -%>.png">
+      <% else %>
+        <img src="<%= ApplicationController.root_context -%>/images/priority/<%= violation.failure_level -%>.png">
+      <% end %>
       &nbsp;
       <img src="<%= ApplicationController.root_context -%>/images/sep12.png">
       &nbsp;
 
           <% unless violation.review && violation.review.resolved? %>
             <%= button_to_function message('reviews.change_severity'), "sCSF(#{violation.id})", :name => 'bChangeSeverity' -%>
-            
-            <% 
+
+            <%
                @action_plans_size = ActionPlan.count_open_for_project_id(violation.snapshot.root_project_id) unless @action_plans_size
-               if @action_plans_size > 0 
+               if @action_plans_size > 0
             %>
               <%= button_to_function message('reviews.link_to_action_plan'), "sAPF(#{violation.id})", :name => 'bLinkActionPlan' -%>
             <% else %>