Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
08d29f981b13
Commit
7ee1d68e
authored
Apr 27, 2015
by
Dmitriy Zaporozhets
Browse files
Merge pull request #9186 from Senorsen/patch-1
Fix contributions calendar empty problem under mysql
parents
9338573c392c
80dd1de53432
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/gitlab/contributions_calendar.rb
View file @
08d29f98
...
...
@@ -17,7 +17,7 @@ def timestamps
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'
).
select
(
'date(created_at)
as date
, count(id) as total_amount'
).
map
(
&
:attributes
)
dates
=
(
1
.
year
.
ago
.
to_date
..
(
Date
.
today
+
1
.
day
)).
to_a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment