gitlab-org--gitlab-foss/app/models/group_milestone.rb
2018-08-03 19:52:37 +00:00

25 lines
577 B
Ruby

# frozen_string_literal: true
# Group Milestones are milestones that can be shared among many projects within the same group
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
def legacy_group_milestone?
true
end
end