2015-01-21 00:46:27 +00:00
|
|
|
class RedmineService < IssueTrackerService
|
2018-06-01 11:43:53 +00:00
|
|
|
validates :project_url, :issues_url, :new_issue_url, presence: true, public_url: true, if: :activated?
|
2016-09-29 21:11:32 +00:00
|
|
|
|
2015-01-21 00:46:27 +00:00
|
|
|
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
|
|
|
|
|
|
|
|
def title
|
2015-01-27 00:24:11 +00:00
|
|
|
if self.properties && self.properties['title'].present?
|
|
|
|
self.properties['title']
|
|
|
|
else
|
|
|
|
'Redmine'
|
|
|
|
end
|
2015-01-21 00:46:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def description
|
2015-01-27 00:24:11 +00:00
|
|
|
if self.properties && self.properties['description'].present?
|
|
|
|
self.properties['description']
|
|
|
|
else
|
|
|
|
'Redmine issue tracker'
|
|
|
|
end
|
2015-01-21 00:46:27 +00:00
|
|
|
end
|
|
|
|
|
2016-12-27 12:44:24 +00:00
|
|
|
def self.to_param
|
2015-01-21 00:46:27 +00:00
|
|
|
'redmine'
|
|
|
|
end
|
|
|
|
end
|