Skip to content

Commit 28aa1de

Browse files
committed
fixed commits/changes per month to be displayed at the correct month
1 parent 325ee06 commit 28aa1de

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Diff for: app/reports/report_helper.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ def get_hour_from_date(date)
3838

3939
def total_by_month_for(method)
4040
total = [0] * 12
41-
send(method).each { |c| total[(date_to.month - c.first.to_date.month) % 12] += c.last }
41+
send(method).each do |date, count|
42+
month_index = date.to_date.month - 1 # Get the correct month index (0-based)
43+
total[month_index] += count # Accumulate total for that month
44+
end
4245
total
4346
end
4447

Diff for: lib/redmine_git_hosting/gitolite_wrappers/repositories/delete_repository.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def call
1313
end
1414

1515
def repository
16-
@repository ||= object.symbolize_keys
16+
@repository ||= object_id.symbolize_keys
1717
end
1818

1919
def delete_repository

0 commit comments

Comments
 (0)