speedy32129 / time_logger

Redmine Time logger plugin. More than likely there is only going to be one more public release. New version has new time logging with the option of multiple loggers running at the same time, fixes for excessive loggng, and a whole new look.
Other
59 stars 43 forks source link

Prepopulation of time spent when timer is stopped #31

Open pallibj opened 8 years ago

pallibj commented 8 years ago

When you stop a timer or tracker, you are automatically brought to the Edit of the item you are tracking. At that point, the spent time field is blank.

It would be a nice enhancement that the timetracking would enter that same edit page with the spent time field populated with the timer value as a default suggestion.

Even better, keep the timer/tracker running while entering comments and add a button to the Edit form which would stop the timer and paste current timer value into the Spent time field. This would enable you to enter the edit form, add your comments and then stop the timer without having to enter the hours and without having to account for the time spent entering comments.

Palli

speedy32129 commented 8 years ago

Spent time should be populated with the elapse time under your scenario. What browser did you use? Works fine with IE and chrome. This is the whole point of the time logger. Yes and your better being reviewed.

pallibj commented 8 years ago

Tested both FF and Chrome, and same results.

I start a timer and get automatic state transitions on the ticket (according to setup) and timer starts counting. To stop, I click the "stop square" in the top right corner. I then get the ticket opened in edit mode and no time populated in the "Spent time" field, plus the timer stops and I can't see how much time has been spent at this point.

Not sure what might be the cause. One thought is if it has to do with country dependent decimal point? In my country, we use "," as decimal point with "." as thousand seperator.

Palli

speedy32129 commented 8 years ago

ok that helped ...

What is your default country and I'll test it?

Thanks so much!

pallibj commented 8 years ago

Sorry for the delay. My default country would be Iceland I presume.

Palli

speedy32129 commented 8 years ago

Hey no problem. Icelandic is not an option under language. That was my bad. Can you tell me what's under "My account" for language?

RolandSM commented 8 years ago

Hello, with Firefox and Redmine 3.3.0 i´ve got the same issue here. Any solutions? Greets

vikingmedia commented 8 years ago

Hi, I experience the same issue. Here's my setup (Language: English):

Environment:
  Redmine version                3.2.3.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.5.2
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  redmine_checklists             3.1.5
  redmine_helpdesk               0.0.11
  redmine_questions              0.0.7
  time_logger                    0.5.4

I'm using FF and Chrome, it doesn't work on either of them

Chrome Version 49.0.2623.87 (64-bit)
Firefox 49.0
Ubuntu 14.04

Kind Regards

speedy32129 commented 7 years ago

sorry for the delay vikingmedia! What is the language? I think those that are using a comma in the time separator is the issue but no one has given me a valid language under their preferences.

speedy32129 commented 7 years ago

oh sorry tested under firefox 49.0.1 and it's fine using english

vikingmedia commented 7 years ago

hi speedy, thanks for your reply. What language setting do you mean? I am using English:

image

but even when i switch to German (a language some of my colleagues use) it is still a dot as the decimal separator. So apparently the language setting doesn't have any effect on the decimal separator of the time tracker.

vikingmedia commented 7 years ago

Hi @speedy32129 , I've investigated further and found out, that the URL to preset the time to log is urlencoded twice, leading to a request that looks like this:

/issues/14130/edit?time_entry%255Bhours%255D=0.02

urldecoded it looks like

/issues/14130/edit?time_entry%5Bhours%5D=0.02

when in fact it should look like

/issues/14130/edit?time_entry[hours]=0.02

when I enter the URL

/issues/14130/edit?time_entry[hours]=0.02

in the browser it works! So this doesn't seem to be a problem based on locale settings.It is probably a different problem @pallibj experienced.

Greets, Erik

luizrenault commented 7 years ago

Hi. I have the same problem here. Can anybody help?

luizrenault commented 7 years ago

Hi. I found a solution.

In file time_logger/app/controllers/time_loggers_controller.rb comment line: :protocol => Setting.protocol,

vikingmedia commented 7 years ago

Hi @luizrenault, I can confirm that this fixed the issue for me as well. Thank you very much for your solution!