diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-01 19:19:58 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-10-02 15:28:07 +0200 |
commit | dd9b60a85b5cb8e76ca29759fb93fc16219b4133 (patch) | |
tree | 97061e18fd4467e027bca6834f00ca37852dc7b3 /server/sonar-web | |
parent | bd4be93baf327fad6d21faae88ed8929039671dc (diff) | |
download | sonarqube-dd9b60a85b5cb8e76ca29759fb93fc16219b4133.tar.gz sonarqube-dd9b60a85b5cb8e76ca29759fb93fc16219b4133.zip |
SONAR-5663 Reindex issues when renaming a project Key
Diffstat (limited to 'server/sonar-web')
-rw-r--r-- | server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 150b37a3e7e..09148fc3bec 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -164,13 +164,9 @@ class ProjectController < ApplicationController elsif Project.by_key(new_key) flash[:error] = message('update_key.cant_update_x_because_resource_already_exist_with_key_x', :params => [project.key, new_key]) else - begin - java_facade.updateResourceKey(project.id, new_key) - reportProjectModification(project.id) + call_backend do + Internal.component_api.updateKey(project.key, new_key) flash[:notice] = message('update_key.key_updated') - rescue Exception => e - flash[:error] = message('update_key.error_occured_while_renaming_key_of_x', - :params => [project.key, Api::Utils.exception_message(e, :backtrace => false)]) end end @@ -207,13 +203,9 @@ class ProjectController < ApplicationController replacement_string = params[:replacement_string].strip unless string_to_replace.blank? || replacement_string.blank? - begin - java_facade.bulkUpdateKey(project.id, string_to_replace, replacement_string) - reportProjectModification(project.id) + call_backend do + Internal.component_api.bulkUpdateKey(project.key, string_to_replace, replacement_string) flash[:notice] = message('update_key.key_updated') - rescue Exception => e - flash[:error] = message('update_key.error_occured_while_renaming_key_of_x', - :params => [project.key, Api::Utils.exception_message(e, :backtrace => false)]) end end |