summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-24 12:18:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-24 12:18:29 +0000
commit0a6a7f0ed7be045640f98cbb14a61588995670c1 (patch)
tree96fd29043b527f70adcb986fb211470f1ec2a719 /lib
parente37ee0d21b1bb9fc1ff082c4303c8dfb26bc8ce0 (diff)
downloadredmine-0a6a7f0ed7be045640f98cbb14a61588995670c1.tar.gz
redmine-0a6a7f0ed7be045640f98cbb14a61588995670c1.zip
Fixed that time entries report by week breaks on edge cases (#5329).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11471 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/helpers/time_report.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/helpers/time_report.rb b/lib/redmine/helpers/time_report.rb
index 870452758..09093dc95 100644
--- a/lib/redmine/helpers/time_report.rb
+++ b/lib/redmine/helpers/time_report.rb
@@ -63,7 +63,7 @@ module Redmine
when 'month'
row['month'] = "#{row['tyear']}-#{row['tmonth']}"
when 'week'
- row['week'] = "#{row['tyear']}-#{row['tweek']}"
+ row['week'] = "#{row['spent_on'].cwyear}-#{row['tweek']}"
when 'day'
row['day'] = "#{row['spent_on']}"
end
@@ -90,7 +90,7 @@ module Redmine
@periods << "#{date_from.year}-#{date_from.month}"
date_from = (date_from + 1.month).at_beginning_of_month
when 'week'
- @periods << "#{date_from.year}-#{date_from.to_date.cweek}"
+ @periods << "#{date_from.to_date.cwyear}-#{date_from.to_date.cweek}"
date_from = (date_from + 7.day).at_beginning_of_week
when 'day'
@periods << "#{date_from.to_date}"