debian-mirror-gitlab/app/models/resource_milestone_event.rb
2023-03-17 16:20:25 +05:30

26 lines
625 B
Ruby

# frozen_string_literal: true
class ResourceMilestoneEvent < ResourceTimeboxEvent
include IgnorableColumns
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)
ignore_columns %i[reference reference_html cached_markdown_version], remove_with: '13.1', remove_after: '2020-06-22'
def milestone_title
milestone&.title
end
def milestone_parent
milestone&.parent
end
def synthetic_note_class
MilestoneNote
end
end