hicknhack-software / redmine_time_tracker

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

The Running Time in overview page disappeared #110

Closed shuozhifenxi closed 10 years ago

shuozhifenxi commented 10 years ago

The Running Time in overview page disappeared. The label "running time" is still there but the time just disappeared.

shuozhifenxi commented 10 years ago

running time

shuozhifenxi commented 10 years ago

I attached a picture to show the problem. Please see the red circle.

jume-dev commented 10 years ago

Try changing something, like Round Time. Oh, and what is your local time right now? could it be, you misstyped something which reproduces negative running time, which then gets hidden somehow?

shuozhifenxi commented 10 years ago

I tried change Round time, but no difference.

My local time is 15:17. And the running time itself is OK and positive. I can see the correct running time in active trackers page with no problem. Just the running time on overview page disappeared.

jume-dev commented 10 years ago

Any Browser plugins blocking javascript or maybe an adblocker? Please see also the javascript console in chrome or something, if there are any errors.

shuozhifenxi commented 10 years ago

Oh, there is one error,

Uncaught Error: Syntax error, unrecognized expression: #time_tracker_date} jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js?1370117642:2

jume-dev commented 10 years ago

Please try to debug, what causes this bug, i will try to reproduce it tomorrow when im back in offce

shuozhifenxi commented 10 years ago

It seems that the error is in app/view/time_trackers/_timer.js.erb

It used to be

var start = new Date();

But now it is

var start = new Date($('#time_tracker_date').val().replace(/-/ig, '/') + ...

The browser is complaining #time_tracker_date is unrecognized expression.

I am not good at js script. And I hope this is helpful.

jume-dev commented 10 years ago

Well, on the repo its still var start = new Date(); So it seems like you changed the code, which is not really a bug then ;)