diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-06 15:10:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-06 15:10:38 +0300 |
commit | 25db9c1230f7b54a7337b3d2dfe714478a7d54f0 (patch) | |
tree | b9b8d6494ad4098c52eb029ae6a47d795abf9f5b /app/models/timelog.rb | |
parent | c06178d51ad9b8d4ce665047873615facfc9c1c5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/timelog.rb')
-rw-r--r-- | app/models/timelog.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/models/timelog.rb b/app/models/timelog.rb index b8ca6e1fdd0..bd543526685 100644 --- a/app/models/timelog.rb +++ b/app/models/timelog.rb @@ -14,12 +14,8 @@ class Timelog < ApplicationRecord belongs_to :user belongs_to :note - scope :for_issues_in_group, -> (group) do - joins(:issue).where( - 'EXISTS (?)', - Project.select(1).where(namespace: group.self_and_descendants) - .where('issues.project_id = projects.id') - ) + scope :in_group, -> (group) do + joins(:project).where(projects: { namespace: group.self_and_descendants }) end scope :between_times, -> (start_time, end_time) do |