diff options
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index d5b9a4dc30f..c23921f28bd 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -56,6 +56,7 @@ class Milestone < ApplicationRecord scope :with_api_entity_associations, -> { preload(project: [:project_feature, :route, namespace: :route]) } scope :preload_for_indexing, -> { includes(project: [:project_feature]) } scope :order_by_dates_and_title, -> { order(due_date: :asc, start_date: :asc, title: :asc) } + scope :with_ids_or_title, ->(ids:, title:) { id_in(ids).or(with_title(title)) } validates :group, presence: true, unless: :project validates :project, presence: true, unless: :group |