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:
Diffstat (limited to 'app/models/timelog.rb')
-rw-r--r--app/models/timelog.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/timelog.rb b/app/models/timelog.rb
index bd543526685..96fd485b797 100644
--- a/app/models/timelog.rb
+++ b/app/models/timelog.rb
@@ -18,8 +18,12 @@ class Timelog < ApplicationRecord
joins(:project).where(projects: { namespace: group.self_and_descendants })
end
- scope :between_times, -> (start_time, end_time) do
- where('spent_at BETWEEN ? AND ?', start_time, end_time)
+ scope :at_or_after, -> (start_time) do
+ where('spent_at >= ?', start_time)
+ end
+
+ scope :at_or_before, -> (end_time) do
+ where('spent_at <= ?', end_time)
end
def issuable