This module is great, and has a lot of potential. I am using freshbooks right now, which is also a great system, but is a separate site, whereas I would prefer to keep my customers on my site.

The only thing missing from this module, is a real-time project timer. This is the single thing I rely on the most at Freshbooks. It's basically a javascript popup window with a start/pause button, a 'log hours' button, and drop-downs for the project you are working on. I use this to log all my hours, so that I don't have to check the start or stop time, and I can pause the timer while I take a break for a while.

The lack of this is holding me back from using this module for the time being, but I'm really wishing this functionality was there! I would definitely switch to this module. Just playing around with it, I can see you've done a nice job of putting it together, adding a little javascript/ajaxy type functionality, and keeping it all node-based so it can be easily integrated into the Drupal system (I can think of so many things to do with views for this).

So on that note, is this an idea you have considered implementing? It would be much appreciated by me if you did.

CommentFileSizeAuthor
#19 work_timer.zip2.6 KBJaypan
#13 timetrackingsketch.jpg41.58 KBdeggertsen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jaypan’s picture

Bump

Roberto Gerola’s picture

> Bump
What dos this mean ?

peterx’s picture

Infonomix, dotproject, and others provide timers. If Storm had an optional javascript timer module then Storm would be close to a 100% replacement for Infonomix and remove one of the main incentives for using the other project management tools. Even in organisations that do not bill customers, managers want time recorded.

Timer screens are often lost on a busy desktop. For my use, the ideal time recorder would update the database once per minute using Ajax. If I shut down the browser without remembering to record the end time, there will be an end time to the nearest minute. Jquery timers lets you time easily using the best of Jquery and could be easily connected to a standard button you could put on task and project pages. We could then record against a task or project without having to set up artificial tasks.

A timer table would be useful to let us see the times as recorded. When we hit start, create a new row then each minute update the end time in the row. The button text would change to stop and there could be text next to the button showing the cumulative time.

There was a timer for Drupal 5 but it is not for D6, required CCK, and is not Jquery, leaving the user with possible browser compatibility issues. A Storm Timer could be useful outside of Storm if it could be used without activating other Storm modules.

Jaypan’s picture

> What dos this mean ?

Bump is when you 'bump' a thread to the top of the list by adding a post. Basically, I'm just asking the question again, since there was no reply.

Roberto Gerola’s picture

Would you available to sponsor the development of this feature ?

Magnity’s picture

Marked #282787: Time tracking through a js stopwatch as a duplicate of this issue.

asak’s picture

Check this out: http://drupal.org/project/bubbletimer.

Funky - and REALLY easy to integrate.
A possible way could be to have minimal integration and add-on functionality with that module enabled.

Magnity’s picture

Version: 6.x-1.18 » 6.x-1.x-dev
Magnity’s picture

Component: User interface » Storm Timetracking

Would somebody like to take a stab at this?

It'd be good to even simply have a button for each of the start / end times which inputs the current time to that field.

homoludens’s picture

We have here two totally different approaches:
1. stopwatch (http://plugins.jquery.com/project/timers)
2. bubbletimer (http://drupal.org/project/bubbletimer)

Mine choice would be bubbletimer (check out the screencast http://www.youtube.com/watch?v=hfajpm2No1o ), because I do not understand usefulness of stopwatch - with it when you are working on some task/ticket/project you would have to open it's node. On the other side that could be easier then measuring time be hand... Am I right?

Maybe some combination would be most complete (and complicated) solution.

Other opinions?

Mark_Watson27’s picture

Magnity’s picture

perhaps soon - but don't think it is all quite covered yet.

deggertsen’s picture

FileSize
41.58 KB

I have attached an image of what I think creating a Timetracking node should look like. This would include a simple start and stop that would log the current time and date and then automatically total it (with permissions to only allow admins to manually change the times).

What does everybody think?

Mark_Watson27’s picture

Looks good, will it work in the background, i.e. will you be able to navigate elsewhere whilst it's still timing?

deggertsen’s picture

I think it would work to either leave the window up while you're working on the project or you could save it after clicking the start time and then edit the timetracking node when you're ready to put in the stop time. Either way would work I think. I'm not a good enough programmer to actually do this but this seems to be the easiest solution to having a timer... And I would simply like to see some of the changes I show in that sketch implemented.

Jaypan’s picture

That looks nice. That's what I had in mind when I started this thread. I'm pretty sure I can put that together, except that I'm knee deep in a project until the end of the year. But, if I can find some time, I may throw something together quickly.

Mark_Watson27’s picture

How about using http://plugins.jquery.com/project/timeEntry
Would simplify things as well as offer extra functionality and it's under GPL.

deggertsen’s picture

http://plugins.jquery.com/project/timeEntry looks pretty nice. I think that would be a great addition.

Jaypan’s picture

FileSize
2.6 KB

I had a little time, so I did a bit of work on this. I created a module that creates two URLs:

1) www.example.com/work_timer - This is just a link that opens up the popup timer. If we integrate this into Storm, this URL/page will be removed, and the link will have to be incorporated into the necessary area(s) in Storm.
2) www.example.com/timer_popup - This is the actual popup with the timer built in.

I copied the .jpg attached a few posts back for the form fields (I didn't style it at all though). Basically there is a timer, and a start link. When the start link is clicked, the timer starts counting, when it's clicked again, the timer stops counting. The speed of the timer can seem a little unbalanced at times (like some seconds are long and/or some seconds are short), but there is a reason for this. Javascript timers that count time internally are unreliable, because the script can get bogged down when there are not enough system resources, throwing off the internal counter. To get around this issue, what I have done is to mark a start time when the button is clicked (based off the system clock), then approximately each second, recalculate the number of seconds/minutes/hours that have passed since that time, based on the current time on the system clock. This way, even if the system processor gets a little overloaded and the system slows down, the number it displays will always be based off a real time - the time on the system clock. System clocks, unlike javascript timers, are mostly reliable. So even if the counting seems to lag at times, the actual time displayed is correct at the moment it is displayed.

The good news: The timer works.
The bad news: This module isn't even remotely integrated into Storm whatsoever right now. I'm not actually using Storm (basically I've been waiting for this module! Until it's done, I'm using a paid service). So I don't know exactly what data needs to be pulled from where in order to populate the form with clients and projects etc, and I don't know what data needs to be submitted to where, when submitting the form. I'll have some time to look over it around the end of the year, and which point if no one else has taken the time to finish this module, I'll do it myself. But until then, I'm really busy, so if someone wants to take the reigns and integrate the module I'm attaching into Storm, that would be great.

Mark_Watson27’s picture

Status: Active » Needs review

I've managed to integrate the jQuery timeEntry, if you want to have a look before I tidy up and make a patch:

URL: http://storm.ctscomputing.com/node/715/edit
Username: stormtest
Password: Storm-Test

deggertsen’s picture

@Mark_Watson27 Looks great! I really like the jQuery timeEntry integration. And it looks like the duration is updated automatically. Love it love it love it!

Magnity’s picture

I wonder if there is a way it could be a bit simpler? The time controls for the field are a little over the top I feel - really we only need the functionality from the central button - i.e. set the field to time().

Ideally the duration would update on the update of the time end field too.

So - functionality wise its good, but usability wise, still needs a bit of work.

Jaypan’s picture

One thing I don't like about it is that (seeming) inability to pause the timer, and come back to it. Although maybe I just didn't notice it.

deggertsen’s picture

The only reason I would want it simpler is if you only had the ability to start and stop but once you put in the value and save you can't change it again. But admins would be able to go in and edit the times. But if we don't want to go into that then I like being able to use the arrows to change the time, I actually think that is much more simple for the end user than what we currently have. Plus if you simply click the little circle in the center it puts in the current time. I do wish that little circle was bigger...

@Jay I think adding the ability to pause the timer would be too much work and not really necessary. Personally I think that if you need to take a break then stop that timetracking and then create a new one when you get back. That keeps the functionality simple and it keeps the work time periods logged separately.

Mark_Watson27’s picture

@Magnity: Agreed it could be simpler, having said that the plugin does offer some great functionality, probably a bit over the top for just two fields! The plugin does allow you to easily get rid of the left/right arrows if that would make it 'simpler'.

@Jay: I agree with @deggertson that 'pausing' the timing would be more appropriately acheived via two time entries.

@deggertson: I think the granual field access control is a bit over the top and probably not a wide usage scenario. As for the size of the little circle....Well the jquery plugin offered some alternatives so I used the examples to code in a big version when you hover over.

I've also coded in the 'range' functionality of the plugin, this stops you setting time begin after time end or setting time end before time begin.
Up to you guys.

Jaypan’s picture

I'm a freelancer with a one-year old kid. I often have to take 5 - 10 minute breaks here and there to take care of stuff. I don't bill my clients for that time, but what would happen with the above system is that I end up with 10 entries for one day's work. So for me a pause button is essential.

As for it being too much work - the work has already been done. I attached a module a few posts back that that I built that has a start button, which turns into a pause button when the timer is running, with a 'log hours' button as well. It would take about 3 minutes to add the start and end times, so that the output would be start time, end time, and billable time within that range.

Magnity’s picture

A pause button would work if the time end field was removed, but otherwise there could be an inconsistency between the start / end / duration fields, which I'd like to avoid.

deggertsen’s picture

The pause feature would be nice but as I am not really a programmer I have no concept of how difficult it would be... I guess if you took out the end field like Magnity said that would work. In fact I really like the idea of it simply adding time to the duration field while the timer is counting and then allow you to pause and you would simply save the timetracking when you stopped... That would make it so that you could have one ongoing timetracking for each project/task per team member working on it that they could just come back to whenever they wanted to continue on the project. I'm now convinced that this would be the best option. Really no need for a start and end time if you are doing it this way. And it keeps it easier for admins to see how much somebody has been working on a project. I really would be a pain to look through 20 timetrackings for one person just because they had to take a few 10 minute breaks. More thoughts?

Jaypan’s picture

Rather than taking out the end time, taking out the start time may be a better option. That way the time tracking is just logged at the end time, so it shows at what time X amount of work was completed. Though I personally think it's fine to have a start time, and end time, and a time worked column. The discrepancy will be visible at a moment's notice, and it's not like the amount worked would ever be more than the time spanned.

I've worked mainly with two systems - Freshbooks and Paymo. Freshbooks uses the pause button setup, and logs the finishing time, while Paymo requires a new record each time the stop button is pushed. I definitely prefer the Freshbooks method.

Mark_Watson27’s picture

Why don't we keep begin, end and duration fields as is but introduce a billing duration field.

This is how we currently handle time in our company. That way the billing duration can be altered by someone if they don't think it's fair. We also use the billing field to enable multipliers for out of hours work, so that the duration is always accurate but the billing duration can be time and a half or double time.

In the case of the above usage scenario the billing duration is simply less than the actual duration and would be the one affected by the start/pause/stop buttons.

Jaypan’s picture

That works fine as well - the code could be set up to take the duration value if billable duration is empty, or to take billable duration if there is a value.

I'm willing to do the javascript and incorporate it if someone can integrate it into Storm - I don't have enough time to go through Storm to figure out how to properly integrate a module into it right now.

I'm glad this is moving forwards though - I've really wanted to use Storm ever since I first saw it, and the only thing holding me back is the lack of a timer. Unfortunately, that means I'm using a paid 3rd party service, but I'd much rather integrate my billing system into my own site so than pay someone else to use their 3rd party application!

jurgenhaas’s picture

Hopefully I'm not joining this great discussion too late. I'd be willing to integrate this improved timetracking functionality into my two modules storm_quicktt and/or storm_dashboard and as they both come with some space on screen already, it would just require the pause/resume and the stop buttons.

With regard to the last few posts I would like to suggest that there should be 2 extra fields: (1) as already suggested the billable time field which can be manually adjusted for many reasons and (2) a field which summarzies the pause time which was counted between start and end time. This would in all regular cases explain as this: end-time - start-time + pause-time = duration. And then billable time would be the relevant one, the other 4 fields are computed values.

A second question is about the automatic recording: so far the suggestion is to implement ths browser based. However, I could imagine a server based recording too. This would help to record time even if it wasn't performed in front of a PC, e.g. customer visits, travelling, and others.

deggertsen’s picture

Storm_quicktt is looking to be a great addition as well as storm_dashboard though it would be nice if all the functionality was built into storm core as I see this as something everybody would probably want and need. I believe once we have added a timer into the edit timetracking then storm_quicktt could then take advantage of that to be able to not only stop the timetracking but pause it also. Otherwise I feel that storm_quicktt is already a pretty great solution.

Magnity’s picture

Its probably easier if as much as possible of the functionality goes in the main Storm Timetracking module.

I'm fine with adding billable time. For upgrade purposes, the contents of existing duration fields should probably become the billable time field, and the duration field should become the time end - time beginning. This would also get rid of the need for an option for recalculating the duration, as one would always be computed (duration) and one would either be input manually or by the timer.

For time when you're not in front of the PC, i'd suggest the timer would be irrelevant and you'd just use manual entry to put in times.

I think we're all pretty much in agreement now?

jurgenhaas’s picture

Thanks @deggertsen. I think we do not need a time in the edit form of the stormtimetracking form. We would only need the fields for billable time and maybe paused time as suggested in #32.

QuickTT would deliver the functionality, either for being used by the QuickTT block or by the start and stop buttons already available in Storm_Dashboard. There we would only need a pause button and I'm happy to build them in shortly.

Including the two modules into Storm core is something I'm happy to accept. The decision depends on the Storm maintainers.

Magnity’s picture

The inclusion of those modules or the functionality from them is something we'd have to discuss in a different topic, which i'd be happy to chat about.

Meanwhile, lets focus on the topic in hand, the timer functionality.

deggertsen’s picture

@Magnity I think we're on the same page.

@jurgenhaas I would wait to develop QuickTT much further until the main Storm Timetracking construction dust has settled. Once that is done you will be able to adjust QuickTT to match what is available in the storm core TT.

jurgenhaas’s picture

Agreed

Jaypan’s picture

I'm glad you guys are in agreement about a pause function on the timer.

Magnity - send me a mail through my contact form if you need me to do any javascript work, or want some assistance with this in some other manner. I have a fair bit of experience with developing modules (Drupal 6 only though).

Magnity’s picture

Patches are always more than welcome on any issue. I'll also admit js is not my forte.

I'm not sure if @Mark_Watson27 is still in progress with something though - as he seems to have done a fair bit of it already. Otherwise feel free to go ahead.

Mark_Watson27’s picture

The work I'd done was only to set the begin/end fields via a click, not a timer as such.
I'd agree that using Storm_QuickTT or it's features would be best for this issue.

As such I see the next steps as (as per @Magnitys comment #34)

1) Change existing duration field to billing duration. I presume we need to do it this way for is for invoicing purposes.
2) Implement new duration field
3) Use Storm_QuickTT to set begin as start of timetracking, end as end of timetracking, duration as difference of these two and billing duration to exclude any pauses.

So let's not re-invent the wheel with the great javascript work of @jurgenhaas in the timer for QuickTT/Dashboard, leaving the question of who's up for altering the Storm module side of things (i.e. step 1 and 2)?

Cheers
Mark

jurgenhaas’s picture

I agree. I'm ready to go for step 3 as soon as 1 and 2 are done.

Magnity’s picture

So for users that did not install storm_quicktt, they would be left with an additional field that they have to manually fill in?

deggertsen’s picture

@Magnity I think that's fine.

Are we leaving out the pause button or is that going to be part of quicktt?

jurgenhaas’s picture

I think the pause button will (at least) be part of QuickTT

Magnity’s picture

I would like to be satisfied that the experience for a user who had Storm but not QuickTT would not be degraded - and in this case I mean things which would cause more hassle for them, such as needing to enter more values into fields to get the same operation.

As I understand it from the discussion, billing duration would be the field then used for other functions such as automatic billing. However, if billing duration is no longer linked to start / end times, those users who used to enter their own start / end times and let storm do the rest will be losing out.

Mark_Watson27’s picture

Well we could let them decide via an option, i.e. a setting that allows them to use QuickTT to handle the start/end/duration fields or in the abscense of the QuickTT module let Storm do the work.

Magnity’s picture

Status: Needs review » Fixed

I've just committed the changes as per 1 and 2 of #41. Assuming the rest is going into storm_quicktt or similar, i'm marking this issue as fixed. Equally though i'd be happy to add the timer to 'Storm core' if preferred - just reopen.

There was an existing setting that controlled whether duration was automatically calculated on each node save, and I have used this in order to set whether the 'billing_duration' field is automatically set equal to the 'duration' field. Therefore if this is going to be used by storm_quicktt, then perhaps this variable needs to be set false.

jurgenhaas’s picture

That's great. I'm going to submit number 3 of #41 later today and that will then work for QuickTT as well as for Storm Dashboard.

jurgenhaas’s picture

Just submitted the new feature which allows pause/resume of timetracking for the current project if using QuickTT. When Storm_Dashboard is used, timetracking can be started/stoped and paused/resumed for organizations, projects, tasks and tickets.

At the moment, just the text "Pause" or "Resume" is displayed and we may want to replace that with icons. I'm open for suggestions.

What I'm doing next is to implement the ongoing storage of elapsed time so that you can't forget to save your timetracking.

jurgenhaas’s picture

Well, I have now implemented the timer in QuickTT as well. That was a bigger deal than I thought but it should now be working very nicely and is fully integrated with Storm_Dashboard (if available) and the QuickTT can operate as an API without the visible block, if that's what you prefered.

Looking forward to you feedback, but probably not in this thread anymore but in a separate issue in the QuickTT queue.

kvvnn’s picture

I just found this module, came across this issue, and I'm in awe at this development circle. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Francewhoa’s picture