From 6fa5cc17ce2d83fa766e87c0eadf98c4abd6575b Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 22 May 2012 23:05:21 +0200 Subject: [PATCH] SONAR-2706 Reload review after execution of command --- .../WEB-INF/app/controllers/project_reviews_controller.rb | 1 + .../main/webapp/WEB-INF/app/controllers/reviews_controller.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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} -- 2.39.5