Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6469 closed enhancement (fixed)

Add Stopwatch To TandE plugin

Reported by: bobbysmith007 Owned by: bobbysmith007
Priority: normal Component: TimingAndEstimationPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Tay Ray Chuan has some work completed to add a stopwatch to the ticket interface. Pull this in to the main plugin branches and test.

Code at: http://github.com/rctay/tae-stopwatch

Attachments (0)

Change History (9)

comment:1 Changed 4 years ago by rjollos

  • Type changed from defect to enhancement

comment:2 Changed 4 years ago by rctay

Hi,

I've hooked it as 'TicketStopwatch' onto the timingandestimationplugin package.

If you want to test, you can get a fully-functional version of timingandestimationplugin with the stopwatch from the branch 'master' (tarball).

If you want to import it over your existing svn repo, I've an import-friendly version containing only the files that are new and/or touched at the branch 'export' (tarball)

comment:3 Changed 4 years ago by bobbysmith007

(In [7435]) Merged in stopwatch changes to trac0.11 branch re #6469

comment:4 Changed 4 years ago by bobbysmith007

(In [7436]) merged stopwatch into trac0.11-Permissions branch re #6469

comment:5 follow-up: Changed 4 years ago by bobbysmith007

  • Resolution set to fixed
  • Status changed from new to closed

Thanks again for your work benefiting us all. I have added you to the authors lists.

It would be really great if the stopwatch persisted its state with a few ajax requests so that a browser crash doesn't lose the stopwatch time you are trying to preserve. Obviously this would have to be based per ticket so as not to have multiple tickets quash each other.

comment:6 Changed 4 years ago by bobbysmith007

(In [7437]) added author note re #6469

comment:7 Changed 4 years ago by bobbysmith007

Also I just noticed that you are just counting up.

With javascript being cooperatively multithreaded and often times sharing a single process across tabs, you cannot assume that your interval will actually fire every x ms as specified. You should instead store the start time and then calculate how much time has elapsed since then and update your display accordingly. It seems like you are just counting up which could cause your times to be very much under the amount of time actually spent.

comment:8 in reply to: ↑ 5 ; follow-up: Changed 4 years ago by bobbysmith007

Replying to bobbysmith007:

It would be really great if the stopwatch persisted its state with a few ajax requests so that a browser crash doesn't lose the stopwatch time you are trying to preserve. Obviously this would have to be based per ticket so as not to have multiple tickets quash each other.

The time would also need to be stored per user so that two separate people who start a stopwatch on the same ticket can record their time separately

comment:9 in reply to: ↑ 8 Changed 4 years ago by rctay

Replying to bobbysmith007:

Replying to bobbysmith007:

It would be really great if the stopwatch persisted its state with a few ajax requests so that a browser crash doesn't lose the stopwatch time you are trying to preserve. Obviously this would have to be based per ticket so as not to have multiple tickets quash each other.

The time would also need to be stored per user so that two separate people who start a stopwatch on the same ticket can record their time separately

This is a pretty cool feature - I'll probably look into it sometime.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from bobbysmith007. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.