summaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-06-14 16:00:52 +0200
committerDavid Gageot <david@gageot.net>2012-06-14 17:31:58 +0200
commit627de7e0c768fc6dfa7d290f2af7ba89a44cec5b (patch)
tree76ccd29b67490ec2c850df609a65f38d26e22514 /sonar-server
parent4512dbdb88949e10b1335d9eecdf182f5ad85a1e (diff)
downloadsonarqube-627de7e0c768fc6dfa7d290f2af7ba89a44cec5b.tar.gz
sonarqube-627de7e0c768fc6dfa7d290f2af7ba89a44cec5b.zip
SONAR-3447 Users with accents are now shown in the "Assign To" list
In fact we completely ignore the accents so that e=é,a=à...
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb
index 30b06744cf3..755bf5a9bfc 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/users_controller.rb
@@ -169,7 +169,8 @@ class UsersController < ApplicationController
end
def autocomplete
- @users = User.find(:all, :conditions => ["UPPER(name) like ? AND active=?", params[:user_name_start].clone.upcase+"%", true])
+ starts_with = Regexp.new(params[:user_name_start].parameterize.upcase + '(.*)')
+ @users = User.find(:all, :conditions => ["active=?", true]).to_a.select { |user| user.name.parameterize.upcase =~ starts_with }
@char_count = params[:user_name_start].size
render :partial => 'autocomplete'
end