debian-mirror-gitlab/app/models/resource_milestone_event.rb
2023-05-27 22:25:52 +05:30

22 lines
477 B
Ruby

# frozen_string_literal: true
class ResourceMilestoneEvent < ResourceTimeboxEvent
belongs_to :milestone
scope :include_relations, -> { includes(:user, milestone: [:project, :group]) }
# state is used for issue and merge request states.
enum state: Issue.available_states.merge(MergeRequest.available_states)
def milestone_title
milestone&.title
end
def milestone_parent
milestone&.parent
end
def synthetic_note_class
MilestoneNote
end
end