Opened 16 years ago
Closed 15 years ago
#4835 closed defect (fixed)
Listing worked hours doesn´t show all worked hours
Reported by: | anonymous | Owned by: | Jeff Hammel |
---|---|---|---|
Priority: | normal | Component: | TracHoursPlugin |
Severity: | major | Keywords: | |
Cc: | r.barnebeck@…, m.boehmer@…, t.reppe@… | Trac Release: | 0.11 |
Description
When I click on the menu item "Hours" then all hours between a start date and an end date will be listed. But not all worked hours will be in this list. If an hour is worked on a day (that ist also the selected start date) but is recorded on a later day, this recorded hours won´t be in the list.
Fixing the line 994 in the hours.py from
where += " and time_started > %s"
to
where += " and time_started >= %s"
has solved the problem. We integrated the version 0.2.2 of the TracHoursPlugin
Attachments (0)
Change History (8)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
It looks like time_started represents the date when the hours was entered but not the date when the hours was spent.
comment:3 follow-up: 4 Changed 15 years ago by
Hello andy1917@…,
we think the problem is that if you enter the time for another day before the current day, then the time is set to 00:00:00 when you look to the where-clause I posted, then you see that the original query only catches all hours > 00:00:00 but it should catch all hours >= 00:00:00
comment:4 follow-up: 5 Changed 15 years ago by
Ок, let's put the "day-before-time" to 00:00:01 because 23:59:59.99(9) == 00:00:00 as far as I remember from high school ;) This should eliminate the ambiguity.
comment:5 Changed 15 years ago by
Okay, setting the time to 00:00:01 instead of 00:00:00 would solve the problem too. But I think the better solution is still what I suggested in Post#1 because with this solution you catch really all hours of this day.
comment:6 Changed 15 years ago by
Replying to andy1917@gmail.com:
Ок, let's put the "day-before-time" to 00:00:01 because 23:59:59.99(9) == 00:00:00 as far as I remember from high school ;) This should eliminate the ambiguity.
you cannot enter hours at "23:59:59.99(9)", but you can enter hours at "00:00:00" so maybe line 994 is the better way, isn't?
comment:7 Changed 15 years ago by
Thanks. It has fixed the problem. I just have been assumed that this patch was applied to official builds long time ago ;)
The problem is not fixed. Used versions: Trac 0.11.5 TracHoursPlugin 0.3.1-py2.6 r6398