Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2015-01-26 22:39:32 +0300
committerMarin Jankovski <maxlazio@gmail.com>2015-01-26 22:39:32 +0300
commit65e700472b471242475eb9d9e3a340c6ce24615a (patch)
tree1e859b9989e8f570e4bbe229335bde295c977241 /app/controllers/projects/services_controller.rb
parentc70dcd290704777104a136bd038dffc68daec4ab (diff)
Update the issue tracker attribute on issue tracker change.
Diffstat (limited to 'app/controllers/projects/services_controller.rb')
-rw-r--r--app/controllers/projects/services_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb
index 15f47ed9c9f..a2cb4ae1ae9 100644
--- a/app/controllers/projects/services_controller.rb
+++ b/app/controllers/projects/services_controller.rb
@@ -17,6 +17,9 @@ class Projects::ServicesController < Projects::ApplicationController
def update
if @service.update_attributes(service_params)
+ if @service.activated? && @service.category == :issue_tracker
+ @project.update_attributes(issues_tracker: @service.to_param)
+ end
redirect_to edit_project_service_path(@project, @service.to_param),
notice: 'Successfully updated.'
else