From 62c00661c43334f8e2bbed508d9517529dbee7e0 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Tue, 20 Jan 2015 16:47:29 -0800 Subject: Allow creation of the jira and redmine services. --- app/controllers/projects/services_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index b2ce99aeb45..15f47ed9c9f 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -17,7 +17,8 @@ class Projects::ServicesController < Projects::ApplicationController def update if @service.update_attributes(service_params) - redirect_to edit_project_service_path(@project, @service.to_param) + redirect_to edit_project_service_path(@project, @service.to_param), + notice: 'Successfully updated.' else render 'edit' end @@ -41,7 +42,8 @@ class Projects::ServicesController < Projects::ApplicationController :title, :token, :type, :active, :api_key, :subdomain, :room, :recipients, :project_url, :webhook, :user_key, :device, :priority, :sound, :bamboo_url, :username, :password, - :build_key, :server, :teamcity_url, :build_type + :build_key, :server, :teamcity_url, :build_type, + :description, :issues_url, :new_issue_url ) end end -- cgit v1.2.1 From 65e700472b471242475eb9d9e3a340c6ce24615a Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 26 Jan 2015 11:39:32 -0800 Subject: Update the issue tracker attribute on issue tracker change. --- app/controllers/projects/services_controller.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/controllers') 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 -- cgit v1.2.1 From ededa98995208591c5792c0ece1a5ec0ef302127 Mon Sep 17 00:00:00 2001 From: Marin Jankovski Date: Mon, 26 Jan 2015 22:46:54 -0800 Subject: Shorter check in services controller. --- app/controllers/projects/services_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index c7cc38b9c67..09bccb4bf8f 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -17,7 +17,7 @@ class Projects::ServicesController < Projects::ApplicationController def update if @service.update_attributes(service_params) - if @service.activated? && @service.category == :issue_tracker + if @service.activated? && @service.issue_tracker? @project.update_attributes(issues_tracker: @service.to_param) end redirect_to edit_project_service_path(@project, @service.to_param), -- cgit v1.2.1