User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


This is an old revision of the document!

Time Tracking


This is currently a work in progress. It will be updated as and when I get time or the checked in code's functionally changes.

Configuration Options

Currently the configuration options only exists in config_defaults_inc.php.


Turns Time Tracking features on or off


Adds calculation links to workout how much time has been spent between a particular time frame. Currently it will allow you to enter a cost/hour and will work out some billing information. This will become more extensive in the future. Currently it is more of a proof of concept.


Instead of a text field turning this option on places a stopwatch on the page with “Start/Stop” and “Reset” buttons next to it. You must have g_use_javascript switched on for this to take effect. A bit gimickie, but who cares.


The time tracking information is attached to a bugnote. Currently it is using an INT column type to hold the number of minutes. admin/schema.php has an update to add this column to the database.

ALTER TABLE bugnote_table ADD COLUMN time_tracking TIME DEFAULT 0;

In previous versions the time_tracking column was held as a MySQL TIME column type. If you are using a cvs version and would like to upgrade to using the INT column, then the following SQL will help you convert the information to the new column type.

ALTER TABLE bugnote_table ADD COLUMN time_tracking_t int default 0;
UPDATE bugnote_table SET time_tracking_t = (HOUR(time_tracking)*60) + (MINUTE(time_tracking)) + IF(SECOND(time_tracking)>30,1,0);
ALTER TABLE bugnote_table DROP COLUMN time_tracking;
ALTER TABLE bugnote_table CHANGE time_tracking_t time_tracking INT DEFAULT 0;

Don't forget to backup your database before applying any updates

mantisbt/issue/4428.1166645094.txt.gz · Last modified: 2008/10/29 04:36 (external edit)