diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index b2ce99aeb45b5b9b172f8223e63da836fa452d9f..15f47ed9c9f3a40909484b552e11390ca6cf0a33 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 diff --git a/app/models/project.rb b/app/models/project.rb index a22f852de6b0bd73a142340849d9fbd57a4c4635..a90081ce73556774c66dd1eca2453e57f990f3a3 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -68,6 +68,9 @@ class Project < ActiveRecord::Base has_one :bamboo_service, dependent: :destroy has_one :teamcity_service, dependent: :destroy has_one :pushover_service, dependent: :destroy + has_one :jira_service, dependent: :destroy + has_one :redmine_service, dependent: :destroy + has_one :forked_project_link, dependent: :destroy, foreign_key: "forked_to_project_id" has_one :forked_from_project, through: :forked_project_link # Merge Requests for target project should be removed with it @@ -321,7 +324,7 @@ class Project < ActiveRecord::Base def available_services_names %w(gitlab_ci campfire hipchat pivotaltracker flowdock assembla - emails_on_push gemnasium slack pushover buildbox bamboo teamcity) + emails_on_push gemnasium slack pushover buildbox bamboo teamcity jira redmine) end def gitlab_ci?