]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2706 Reload review after execution of command
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 22 May 2012 21:05:21 +0000 (23:05 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 22 May 2012 21:05:21 +0000 (23:05 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb

index 76fa3ecc6ac7e178a6ca9ec5b5e4f190b4aa81ee..977fc9030a34d412862f617253ccd6156d197e3c 100644 (file)
@@ -269,6 +269,7 @@ class ProjectReviewsController < ApplicationController
     bad_request('Missing command') if params[:command].blank?
     RuleFailure.execute_command(params[:command], review.violation, current_user, params)
 
+    review.reload
     render :partial => "project_reviews/review", :locals => {:review => review}
   end
 
index 7e3aaa5b27efd35d246bc39b952576abd13dc308..cfc7eccb2a682013f494b6a55714969a2a4a7c98 100644 (file)
@@ -72,7 +72,7 @@ class ReviewsController < ApplicationController
     RuleFailure.execute_command(params[:command], violation, violation.snapshot.root_snapshot.project, current_user, params)
 
     # reload data required for display
-    violation = RuleFailure.find(:first, :include => [:rule, :snapshot, {:review => :action_plans}], :conditions => {:id => violation.id})
+    violation.reload
     screens = violation.available_java_screens(current_user)
 
     render :partial => 'resource/violation', :locals => {:violation => violation, :review_screens => screens}