From: Simon Brandhof Date: Tue, 22 May 2012 21:05:21 +0000 (+0200) Subject: SONAR-2706 Reload review after execution of command X-Git-Tag: 3.1~122 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6fa5cc17ce2d83fa766e87c0eadf98c4abd6575b;p=sonarqube.git SONAR-2706 Reload review after execution of command --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb index 76fa3ecc6ac..977fc9030a3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_reviews_controller.rb @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb index 7e3aaa5b27e..cfc7eccb2a6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb @@ -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}