BigW Consortium Gitlab

redmine_service.rb 585 Bytes
Newer Older
1
class RedmineService < IssueTrackerService
2 3
  validates :project_url, :issues_url, :new_issue_url, presence: true, url: true, if: :activated?

4 5 6
  prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url

  def title
7 8 9 10 11
    if self.properties && self.properties['title'].present?
      self.properties['title']
    else
      'Redmine'
    end
12 13 14
  end

  def description
15 16 17 18 19
    if self.properties && self.properties['description'].present?
      self.properties['description']
    else
      'Redmine issue tracker'
    end
20 21
  end

22
  def self.to_param
23 24 25
    'redmine'
  end
end