hicknhack-software / redmine_time_tracker

A time tracker plugin for Redmine
Other
106 stars 32 forks source link

book a time period with start and stop time are on different days (with screen dumps) #92

Closed shuozhifenxi closed 11 years ago

shuozhifenxi commented 11 years ago

Hi,

This is the follow up for the (closed) issue #85.

Here is a example to show the error.

I have a time log entry ( highlighted on the attached figures), whose total length is 95:19 (almost 4 days), from 1:24 pm to (4 days later) 12:43 pm.

The figure one shows I try to book a time period of length of 34 hours and 35 minute. Everything is fine.

The figure two shows I try to book a time period just 1 minute longer ( 34 hours and 36 minute). The program complains the stop time is invalid (red text box).

BTW, I have updated my program to commit 57bdbc5997 (today's newest commit) before I dump these figures.

timer1

timer2

shuozhifenxi commented 11 years ago

And for the last example, I can not book any time booking longer than 34 hours and 35 minutes.

jume-dev commented 11 years ago

Ah, now we are talking. I could trace the bug and found out, that the code doesnt support booking time where the stop time is greater then the original stop time. Which essentielly means the code doesnt work very well with spent times greater then 24h. This is clearly a bug and I will try to find a way to fix this.

jume-dev commented 11 years ago

Sadly that is not easy to fix, and i even think about a mechanism to prevent creating time logs with that high amount of time. Maybe splitting it up automatically if you stop a timer with so much time.

But this wont fix your problem apparently and as it seems now, this is not even possible. You can only manually enable the book button with any browser debugging tool, the server wont reject your time. this time validation is only in the javascript.

jume-dev commented 11 years ago

ok, i made a workaround. if the spent time of a time log is greater than 24h the valididations for stop and start time wont trigger, so you should be able to book them.

shuozhifenxi commented 11 years ago

Thank you very much.

The workaround works!