summaryrefslogtreecommitdiff
path: root/app/models/project_services
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 17:21:06 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 17:21:06 +0100
commitdc4e2744ba13cd7d75147787550a1272b9d34a95 (patch)
tree0babdf5b691a2828e5731b7199b1a08f501f792e /app/models/project_services
parentc4fa894de22a6ba20f3078f490b708c81b6d6464 (diff)
downloadgitlab-ce-dc4e2744ba13cd7d75147787550a1272b9d34a95.tar.gz
Fix issue tracker service
Diffstat (limited to 'app/models/project_services')
-rw-r--r--app/models/project_services/issue_tracker_service.rb18
1 files changed, 7 insertions, 11 deletions
diff --git a/app/models/project_services/issue_tracker_service.rb b/app/models/project_services/issue_tracker_service.rb
index 936e574cccd..46ba9808175 100644
--- a/app/models/project_services/issue_tracker_service.rb
+++ b/app/models/project_services/issue_tracker_service.rb
@@ -56,16 +56,12 @@ class IssueTrackerService < Service
end
def initialize_properties
- if properties.nil?
+ if new_record?
if enabled_in_gitlab_config
- self.properties = {
- title: issues_tracker['title'],
- project_url: add_issues_tracker_id(issues_tracker['project_url']),
- issues_url: add_issues_tracker_id(issues_tracker['issues_url']),
- new_issue_url: add_issues_tracker_id(issues_tracker['new_issue_url'])
- }
- else
- self.properties = {}
+ self.title = issues_tracker['title']
+ self.project_url = add_issues_tracker_id(issues_tracker['project_url'])
+ self.issues_url = add_issues_tracker_id(issues_tracker['issues_url'])
+ self.new_issue_url = add_issues_tracker_id(issues_tracker['new_issue_url'])
end
end
end
@@ -98,8 +94,8 @@ class IssueTrackerService < Service
def enabled_in_gitlab_config
Gitlab.config.issues_tracker &&
- Gitlab.config.issues_tracker.values.any? &&
- issues_tracker
+ Gitlab.config.issues_tracker.values.any? &&
+ issues_tracker
end
def issues_tracker