Closed sayyid closed 13 years ago
Well, you're not supposed to do that! (I mean, running several time trackers at the same time is a feature not implemented yet)
However, I don't know what I can do. If you start a tracker, and before the refresh rate times out you start a new one in another tab, then what I'm supposed to do? If I display the time tracker already running, you'll think the second start is ok while it's not.
The better solution is, I think, do avoid such use case... When several time trackers will be allowed, I think I'll just pause the first one and run the second, but this is not crystal clear for the user.
You've already put code for detecting this use-case: (controllers/time_tracker_controller.rb: TimeTrackersController.start@16)
if @time_tracker.nil? ... else flash[:error] = l(:time_tracker_already_running_error) end
I didn't mean to have multiple time trackers running! I think you should display an error via javascript to the user in this case, not via "flash[:error]".
I'm not a ruby developer, and didn't code for redmine, so I don't know whether this (displaying a javascript error) is possible.
Ok, this is related to #7 so. Indeed, there is very few error handling right now as I don't really know what to do... Maybe we could display an error message for a while next to the time tracker or something like that.
Anyway, it will demand some work and I don't have time right now...
Yes that's the same problem! Should I close this issue?
I close it.
Hi! First of all: thanks for this great plugin! I encountered an error when starting multiple timers (i.e. starting a timer (in an already opened tab) when another timer (in another tab) was started before). This was the AJAX request result:
To reproduce this: (maybe you should raise the refresh rate to be able to reproduce this bug)
This also happens if you pause a timer on a tab, and start another timer in a separate tab before it's refreshed to reflect the paused timer.
My redmine: Bitnami redmine stack, 1.1.0.devel The plugin version is 0.4.
Thanks in advance!
edit: Pausing a timer two times (in two separate tabs) or starting a paused timer two times will also result in a corrupt page with the "Loading..." remaining at the middle of the page. The AJAX result in these cases are a whole HTML page, which is inserted into the menu and corrupt it. In these cases, when the menu is refreshed, the page is OK, only the "Loading..." remains in the page!
Stopping a timer two times doesn't corrupt anything, because the stop button is a link to another page and is not an AJAX button.