diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-05-19 10:53:38 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-05-19 10:53:38 +0200 |
commit | dfa4abac0c4ae0ab70a6f42e5ace72d9212ffb30 (patch) | |
tree | 0447a65c66c9565a3185c77766636cf84116cf6d /sonar-server | |
parent | 945e973014404c31b0c99caa0481d4ef3b979bba (diff) | |
download | sonarqube-dfa4abac0c4ae0ab70a6f42e5ace72d9212ffb30.tar.gz sonarqube-dfa4abac0c4ae0ab70a6f42e5ace72d9212ffb30.zip |
SONAR-2426 Allow to directly assign a violation to users
Forgot the option to leave unassigned.
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb | 4 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb | 2 |
2 files changed, 3 insertions, 3 deletions
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 d4680a507d4..62b3f3b8759 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 @@ -224,7 +224,7 @@ class ReviewsController < ApplicationController if !params[:comment_id].blank? && @violation.review @comment = @violation.review.comments.find(params[:comment_id]) end - @user_options = options_for_users() + @user_options = [["Unassigned", ""]] + options_for_users render :partial => 'reviews/violation_comment_form' end @@ -238,7 +238,7 @@ class ReviewsController < ApplicationController sanitize_violation(violation) unless violation.review - assignee = User.find params[:assignee_id] + assignee = User.find params[:assignee_id] unless params[:assignee_id].blank? violation.create_review!( :assignee => assignee, :user => current_user) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb index 9d24f828639..c178620b5ba 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_violation_comment_form.html.erb @@ -18,7 +18,7 @@ <% if @violation.review.nil? || @violation.review.comments.size==0 %> - Assign to: + Assignee: <%= select_tag "assignee_id", options_for_select(@user_options, current_user.id.to_s) %> <% end %> </td> |