debian-mirror-gitlab/app/models/group_milestone.rb

26 lines
577 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
# Group Milestones are milestones that can be shared among many projects within the same group
2017-08-17 22:00:37 +05:30
class GroupMilestone < GlobalMilestone
attr_accessor :group
def self.build_collection(group, projects, params)
super(projects, params).each do |milestone|
milestone.group = group
end
end
def self.build(group, projects, title)
super(projects, title).tap do |milestone|
milestone&.group = group
end
end
def issues_finder_params
{ group_id: group.id }
end
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
def legacy_group_milestone?
2017-09-10 17:25:29 +05:30
true
end
2017-08-17 22:00:37 +05:30
end