From c406dd8df6b414e1ffdb263758770483abb2b464 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Mon, 23 May 2011 12:02:13 +0200 Subject: [PATCH] SONAR-2454 Assignee must become null when flagging as false-positive --- .../main/webapp/WEB-INF/app/controllers/reviews_controller.rb | 2 ++ 1 file changed, 2 insertions(+) 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 7f093468497..355fbb66ce8 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 @@ -125,6 +125,7 @@ class ReviewsController < ApplicationController @review.review_type = Review::TYPE_FALSE_POSITIVE @review.status = Review::STATUS_CLOSED + @review.assignee = nil @review.save! unless params[:comment].blank? @review.comments.create(:review_text => params[:comment], :user_id => current_user.id) @@ -206,6 +207,7 @@ class ReviewsController < ApplicationController end violation.review.review_type=(false_positive ? Review::TYPE_FALSE_POSITIVE : Review::TYPE_VIOLATION) violation.review.status=(false_positive ? Review::STATUS_CLOSED : Review::STATUS_OPEN) + violation.review.assignee=nil violation.review.save! violation.review.comments.create(:review_text => params[:comment], :user_id => current_user.id) end -- 2.39.5