behigh / redmine_timelog_timer

A simple javascript timer for timelog form
Other
30 stars 21 forks source link

Session level persistence #3

Open 4TT1L4 opened 11 years ago

4TT1L4 commented 11 years ago

I am planning to implement something like "session level persistence". Have you planned it or anything like that (maybe already done it)?

cforce commented 11 years ago

can u explain ur feature "session level persistence" more? Does it mean beyond tab closed or beyond browser closed Does it mean to define working hours in between time logging is possible, or at least running timer will end with last working minute?

4TT1L4 commented 11 years ago

I am planning it to implement using localStorage. It preserves it's contents even if the browser is closed.

It is going to work like this:

First you have no time set, so you start your timer. It starts measuring time. You can close the tab, even if your browser it will continue measuring time. If you reopen the browser and go to the time entry page you will see the time spent since you clicked on the start button. Of course it measures time only if you clicked on the Start button. Otherwise it just stands still and saves it contents.

In a later version I plan to also implement to remember to different Issues. So you can switch between issues and still have your time saved, even without logging to the database by clicking the submit button.

cforce commented 11 years ago

Sounds good.

The feature "meausing time for several issues a the same time (cocurrent)" is another feature.

See https://github.com/behigh/redmine_timelog_timer/issues/4

cforce commented 11 years ago

Btw. check similar plugins.

https://github.com/cforce/redmine_spent_time https://github.com/sharpyfox/linked_time_entries

https://github.com/hicknhack-software/redmine_time_tracker !! This one can do all ur features.

behigh commented 11 years ago

Unfortunately, none of these timers not working. So I wrote this simple script. I'm almost done save the timer in a localStorage, will soon be updated.

4TT1L4 commented 11 years ago

Hi!

Behigh: I have already implemented this function. Sorry for not telling you in time. I am going to upload it to my fork so you can see my solution.

Thank you for making this script. This was just what I needed!

cforce commented 11 years ago

TotalBrutal; Your fork has conflicts with behigh's, please try to sync the timer.js file.

4TT1L4 commented 11 years ago

Thanks for noticing. I shall, but I am very busy doing something else in the next couple weeks.