2020-04-08 14:13:33 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-10-24 23:57:45 +05:30
|
|
|
class ResourceMilestoneEvent < ResourceTimeboxEvent
|
2020-04-22 19:07:51 +05:30
|
|
|
include IgnorableColumns
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
belongs_to :milestone
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
scope :include_relations, -> { includes(:user, milestone: [:project, :group]) }
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
# state is used for issue and merge request states.
|
|
|
|
enum state: Issue.available_states.merge(MergeRequest.available_states)
|
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
ignore_columns %i[reference reference_html cached_markdown_version], remove_with: '13.1', remove_after: '2020-06-22'
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
def milestone_title
|
|
|
|
milestone&.title
|
|
|
|
end
|
2020-06-23 00:09:42 +05:30
|
|
|
|
|
|
|
def milestone_parent
|
|
|
|
milestone&.parent
|
|
|
|
end
|
2023-03-17 16:20:25 +05:30
|
|
|
|
|
|
|
def synthetic_note_class
|
|
|
|
MilestoneNote
|
|
|
|
end
|
2020-04-08 14:13:33 +05:30
|
|
|
end
|