Skip to content

Commit 0038899

Browse files
author
root
committed
1 parent 3cc1cbc commit 0038899

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: lib/redmine_git_hosting/patches/repository_patch.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def commits_per_hours
7373

7474

7575
def commits_per_day
76-
total_commits_by_day = Changeset.where("repository_id = ?", self.id).group(:commit_date).count
77-
total_changes_by_day = Change.joins(:changeset).where("#{Changeset.table_name}.repository_id = ?", self.id).group(:commit_date).count
76+
total_commits_by_day = Changeset.where("repository_id = ?", self.id).group(:commit_date).order(:commit_date).count
77+
total_changes_by_day = Change.joins(:changeset).where("#{Changeset.table_name}.repository_id = ?", self.id).group(:commit_date).order(:commit_date).count
7878

7979
data = {}
8080
data[:categories] = total_commits_by_day.keys
@@ -194,7 +194,7 @@ def commits_per_author
194194
committers = Changeset.where("repository_id = ?", self.id).map(&:committer).uniq
195195

196196
committers.each do |committer|
197-
commits = Changeset.where("repository_id = ? AND committer = ?", self.id, committer).group(:commit_date).count
197+
commits = Changeset.where("repository_id = ? AND committer = ?", self.id, committer).group(:commit_date).order(:commit_date).count
198198

199199
committer_name = committer.split('<')[0].strip
200200
committer_mail = committer.split('<')[1].gsub('>', '')

0 commit comments

Comments
 (0)