Commit dc4e2744 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix issue tracker service

parent c4fa894d
...@@ -56,16 +56,12 @@ class IssueTrackerService < Service ...@@ -56,16 +56,12 @@ class IssueTrackerService < Service
end end
def initialize_properties def initialize_properties
if properties.nil? if new_record?
if enabled_in_gitlab_config if enabled_in_gitlab_config
self.properties = { self.title = issues_tracker['title']
title: issues_tracker['title'], self.project_url = add_issues_tracker_id(issues_tracker['project_url'])
project_url: add_issues_tracker_id(issues_tracker['project_url']), self.issues_url = add_issues_tracker_id(issues_tracker['issues_url'])
issues_url: add_issues_tracker_id(issues_tracker['issues_url']), self.new_issue_url = add_issues_tracker_id(issues_tracker['new_issue_url'])
new_issue_url: add_issues_tracker_id(issues_tracker['new_issue_url'])
}
else
self.properties = {}
end end
end end
end end
...@@ -98,8 +94,8 @@ class IssueTrackerService < Service ...@@ -98,8 +94,8 @@ class IssueTrackerService < Service
def enabled_in_gitlab_config def enabled_in_gitlab_config
Gitlab.config.issues_tracker && Gitlab.config.issues_tracker &&
Gitlab.config.issues_tracker.values.any? && Gitlab.config.issues_tracker.values.any? &&
issues_tracker issues_tracker
end end
def issues_tracker def issues_tracker
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment