Modify

Opened 5 years ago

Closed 5 years ago

#4835 closed defect (fixed)

Listing worked hours doesn´t show all worked hours

Reported by: anonymous Owned by: k0s
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 5 years ago by andy1917@…

The problem is not fixed.
Used versions:
Trac 0.11.5
TracHoursPlugin 0.3.1-py2.6 r6398

comment:2 in reply to: ↑ description Changed 5 years ago by andy1917@…

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: Changed 5 years ago by anonymous

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 in reply to: ↑ 3 ; follow-up: Changed 5 years ago by andy1917@…

Ок, 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 in reply to: ↑ 4 Changed 5 years ago by anonymous

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 5 years ago by anonymous

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 5 years ago by andy1917@…

Thanks. It has fixed the problem.
I just have been assumed that this patch was applied to official builds long time ago ;)

comment:8 Changed 5 years ago by k0s

  • Resolution set to fixed
  • Status changed from new to closed

(In [6407]) fixes #4835

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.