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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-23 00:52:44 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-23 00:52:44 +0300
commit8494170550063c2d0308963cbd14cb46a292c401 (patch)
treed09589d8c21d4fd9e602409917e696580b8b0b1d /lib/gitlab/contributions_calendar.rb
parent7d84252e052de03431edf39d1f3eeebad34758be (diff)
Improve contribution calendar per day info
Diffstat (limited to 'lib/gitlab/contributions_calendar.rb')
-rw-r--r--lib/gitlab/contributions_calendar.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb
index 79e0a514f9e..3fd0823df06 100644
--- a/lib/gitlab/contributions_calendar.rb
+++ b/lib/gitlab/contributions_calendar.rb
@@ -14,11 +14,11 @@ module Gitlab
date_from = 1.year.ago
date_to = Date.today
- events = Event.contributions.where(author_id: user.id).
+ events = Event.reorder(nil).contributions.where(author_id: user.id).
where("created_at > ?", date_from).where(project_id: projects).
group('date(created_at)').
select('date(created_at), count(id) as total_amount').
- reorder(nil).map(&:attributes)
+ map(&:attributes)
dates = (1.year.ago.to_date..(Date.today + 1.day)).to_a