diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-31 09:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-31 09:08:58 +0300 |
commit | 4fbd3e553515d506bd82b42e1ffbb516cf0f178a (patch) | |
tree | e4fe69014d6a660a63e2b31928b5f7fd20615da6 /app/models/milestone.rb | |
parent | 89cd4b410196971a1259463e6d1121ba85d45a6f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/milestone.rb')
-rw-r--r-- | app/models/milestone.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/milestone.rb b/app/models/milestone.rb index aa4ddfede99..4cf0e423a15 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -89,6 +89,10 @@ class Milestone < ApplicationRecord .order(:project_id, :group_id, :due_date).select('DISTINCT ON (project_id, group_id) id') end + def self.with_web_entity_associations + preload(:group, project: [:project_feature, group: [:parent], namespace: :route]) + end + def participants User.joins(assigned_issues: :milestone).where("milestones.id = ?", id).distinct end |