Defect #4953

"In the past N days" filter displays N+1 days

Added by Giuliano Simoncelli over 12 years ago. Updated almost 6 years ago.

Status:ConfirmedStart date:2010-03-01
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:2.2.1


Go in /time_entries/report (all projects)
Select "Last 7 days"
Select "days" in details, add something, the report shows and sums 8 days.

timelog_controller.rb.diff Magnifier (1.34 KB) Yuki Kita, 2010-03-30 15:10

timelog_criteria.png - Screenshot of misbehaviour in filter criteria (49.3 KB) Daniel Felix, 2013-01-14 14:21

Screen Shot 2013-02-13 at 18.21.25.png (42.5 KB) mcfedr mcfedr, 2013-02-14 08:35

spent-time-filter-r16111.png (78.3 KB) Go MAEDA, 2016-12-23 10:24

Related issues

Related to Redmine - Defect #5329: Time entries report broken on first week of year Closed 2010-04-15


#1 Updated by Yuki Kita over 12 years ago

And I noticed that "Last 30 days" filter displays 31 days.
Here is the patch.

#2 Updated by Daniel Felix over 9 years ago

  • File timelog_criteria.png added
  • Status changed from New to Confirmed
  • Affected version (unused) changed from 0.9.2 to 2.2.1
  • Affected version changed from 0.9.2 to 2.2.1

The patch won't apply cleanly, as the corresponding code is completly rewritten.

But I'm stil able to reproduce this (see attachment).

#3 Updated by mcfedr mcfedr over 9 years ago

Noticed this same problem on the latest redmine - It was telling me i have worked 48 hours in the last week!

#4 Updated by Go MAEDA almost 6 years ago

  • File spent-time-filter-r16111.png added
  • Subject changed from In project report "Last 7 days" filter displays 8 days to "In the past N days" filter displays N+1 days

"In the past N days" filter in Current trunk (r16111) has the same behavior.
Not only spent time filter but also issues filter has the same behavior.

Also available in: Atom PDF