]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2454 Assignee must become null when flagging as false-positive
authorFabrice Bellingard <bellingard@gmail.com>
Mon, 23 May 2011 10:02:13 +0000 (12:02 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Mon, 23 May 2011 10:02:13 +0000 (12:02 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb

index 7f0934684972ef63cbd8179cc26f9992064d38d1..355fbb66ce8eac263faf625c6df10548b1627a6f 100644 (file)
@@ -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