2015-02-02 13:24:40 -05:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: services
|
|
|
|
#
|
2015-03-04 17:14:00 -05:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# type :string(255)
|
|
|
|
# title :string(255)
|
|
|
|
# project_id :integer
|
|
|
|
# created_at :datetime
|
|
|
|
# updated_at :datetime
|
|
|
|
# active :boolean default(FALSE), not null
|
|
|
|
# properties :text
|
|
|
|
# template :boolean default(FALSE)
|
2015-02-19 00:02:57 -05:00
|
|
|
# push_events :boolean default(TRUE)
|
|
|
|
# issues_events :boolean default(TRUE)
|
|
|
|
# merge_requests_events :boolean default(TRUE)
|
|
|
|
# tag_push_events :boolean default(TRUE)
|
2015-03-05 13:38:23 -05:00
|
|
|
# note_events :boolean default(TRUE), not null
|
2016-01-05 21:30:59 -05:00
|
|
|
# build_events :boolean default(FALSE), not null
|
2015-02-02 13:24:40 -05:00
|
|
|
#
|
|
|
|
|
2015-01-20 19:46:27 -05:00
|
|
|
class RedmineService < IssueTrackerService
|
|
|
|
|
|
|
|
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
|
|
|
|
|
|
|
|
def title
|
2015-01-26 19:24:11 -05:00
|
|
|
if self.properties && self.properties['title'].present?
|
|
|
|
self.properties['title']
|
|
|
|
else
|
|
|
|
'Redmine'
|
|
|
|
end
|
2015-01-20 19:46:27 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def description
|
2015-01-26 19:24:11 -05:00
|
|
|
if self.properties && self.properties['description'].present?
|
|
|
|
self.properties['description']
|
|
|
|
else
|
|
|
|
'Redmine issue tracker'
|
|
|
|
end
|
2015-01-20 19:46:27 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def to_param
|
|
|
|
'redmine'
|
|
|
|
end
|
|
|
|
end
|