Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-06 15:10:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-06 15:10:38 +0300
commit25db9c1230f7b54a7337b3d2dfe714478a7d54f0 (patch)
treeb9b8d6494ad4098c52eb029ae6a47d795abf9f5b /app/models/timelog.rb
parentc06178d51ad9b8d4ce665047873615facfc9c1c5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/timelog.rb')
-rw-r--r--app/models/timelog.rb8
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