Free, Web Based Project Management with CreativePro Office

Forum Home | Dashboard and Widgets

simple timer

jive
2007-05-03 22:49:14
Hello,
I own a small web design company and at often time billable hours. I am currently using a small web app called clockwork timer: http://www.clockworktimer.com . Please consider something like this with CPO.
jdenton
2007-05-04 11:50:58
Wow! I gave ClockWork an evaluation and they do have a superb product. It makes time tracking about as simple as it can possibly get.

The way I see something like this working in CPO is...
1. Create a project.
2. Assign tasks to the project.
3. Next to each task would be an icon to start/stop the timer for that task.
4. Once the timer is stopped, the elapsed time would be displayed and logged to a timesheet for that project.

This feature would be available in the dashboard task widget and in the project task view. However, I'm not sure how well this would work across page views. I don't yet know how to keep a running timer displayed while, say, you went to enter some invoices or something.

Another option might be to provide a downloaded timer widget that runs on the desktop and then synchs up with CPO when the timer is stopped or the next time an internet connection is available. This way, you could also run the timer in settings where a connection is not available. I've been meaning to evaluate Adobe's Apollo product for awhile now and this might be a good test project.

Thanks for the tip, jive.
michael.olsen
2007-05-04 13:47:53
We have a lot or projects going at once and need to track the design time for each one. Making this time tracker easily accessible for each project is a big plus for us. Hopefully this could get under way soon as we would love to see it integrated into CPO.
michael.olsen
2007-05-04 14:22:23
office time for mac is a good one to check out also
jdenton
2007-05-04 15:01:28
Hi Michael,

It looks like PDF invoices and time tracking are the big pushes right now. I've got a couple of bugs I really need to work through for the next day or so but I'm thinking early next week will see a start to these 2 items. I'll keep posted.
SebyM
2007-05-04 15:50:20
here's another approach to the time sheets:
1. Create a project.
2. Assign tasks to the project.
3. Next to each task would be an icon to start/stop the timer for that task.
digging deeper
- each task is written into a table (eg: `tasks`), so two columns, `timespent`(float(6,1) unsigned) and `timer`(decimal(10) unsigned default 0) , are added to that table. I'll assume we keep track in hours and minutes, so we'll store hours in a 6,1 float format (eg: 2,5 hours).
- OPTIONAL: the table `timelog` is added, with the columns `projectid`, `taskid`, `starttime`,`endtime`,`comments`

- when showing tasks, we check the status of the `timer` column, and if it's 0 (zero), we show 'Start Timer' in the tasks view.
- when we click on 'Start Timer' (see Notes after) the current timestamp (php: date("U")) is placed into the `timer` column, and the link 'Start Timer' changes to 'Stop Timer'.
- we go away (switch website, close browser, close computer, end world)
- we return, when showing tasks, we check the status of the `timer` column, and if it's NOT 0, we show 'Stop Timer' in the tasks view.
- when we click on 'Stop Timer', we store in a variable the difference between the current timestamp and the value in the `timer` column ($newtimespent=date("U")-$row['timer'];). Then we set the `timer` column value to 0; we update the `timespent` column to `timespent`+round(($newtimespent/3600),1). (the /3600 turns seconds into hours, our storing format)
- we show the total time spent by formatting the `timespent`column like this:
$hours=floor($row['timespent']); $minutes=60*($row['timespent']/$hours);
$totaltimespent=$hours." hours and ".$minutes." minutes"; or short: $totaltimespent=$hours.":".$minutes."m";

Notes:
- when we click 'Start Timer' and 'Stop Timer', we have to RECHECK if the timer is in a stopped or started state (because cache can display the wrong button, or you might start the timer on one computer, stop it on another, and then return to the 1st and you'd see 'Stop Timer' there)
- regarding the `timelog`table:
- on start/stop timer we could add an entry to this table so we can backtrack out working times. we add a new row when starting a timer the update it when stopping it (we find the row easily because timelog`.`starttime`=`tasks`.`timer`). Also, when Stopping a timer, we could add a comment (like what exactly we did or whatever) to the `comment` table. If we didn't add a comment right away, we could go and edit a position in the 'View timer log' page that would display the `timelog` table.

Hope this isn't too complicated and you can understand the code and my way of coding. If you have anything you don't get, just ask.
SebyM
2007-05-04 15:54:04
correction:

- regarding the `timelog`table:
[...] we can backtrack OUR working times. we add a new row when starting a timer THEN update[...]
jdenton
2007-05-05 12:20:33
Hey thanks, SebyM! Looks like you've put a lot of thought into this. Let me get past the invoice bugs this weekend and I'll post a more thoughtful reply.
SebyM
2007-05-05 14:29:17
"put a lot of thought into" is an overstatement, it's just something i wrote in an hour or so... thing is, i needed this too since i ofter bill my clients 'by the our' too, so i converted my need to php. good luck on the invoice stuff, i'll keep posting stuff and you can do something with them when ever you have the time for it
bmzero
2007-05-07 21:16:25
I agree, this is a feature that I would use constantly, all day long. It would go a long way in converting me to CreativeOfficePro from my current software. I currently use Vista and would absolutely love a simple Sidebar Gadget that listed my projects in one dropdown list that filtered a second dropdown containing tasks for that project. The timer could be task specific and would be a big plus if it worked while not connected to the Internet and was able to sync once the connection was back.

I would definitely pay for something like this.

Thanks for all of your efforts. It's an amazing product thus far!


.brit
jdenton
2007-05-15 09:13:20
UPDATE: I made some headway on an embedded timer over the weekend. I hope to have a working prototype available early next week. After the functionality of the embedded timer is nailed down, I'll move on and develop the desktop version(s).
jive
2007-05-16 15:21:49
this is great!!!
jdenton
2007-05-22 01:54:38
UPDATE: Thanks for your patience folks - I know this is going slow. Progress is happening however. I've mentioned before that the Timesheet module needed to be recoded before serious work on the job timer could commence. Since the job timer will be feeding data to the Timesheet module, I wanted to make that code more reliable and easier to debug. Well, that part of the project is complete and I really, really hope to have a timer prototype available later this week (maybe Tuesday night???)
jdenton
2007-05-23 16:36:42
UPDATE: We have liftoff! I pushed a timer prototype over last night. There are some known issues that need some tweaking which I'll list in more detail later in a blog post. So I think I'll go kill a few bugs and wait for some feedback on this before moving ahead too much further.