Introduction

Time tracker is a MIndTouch application that will help the MindTouch professional service team quickly log hours on their projects as well as providing an interface for project managers to quickly generate reports on hours utilized per project and per developer.

Purpose

Accuracy of the scope that MindTouch has billed is important, as MindTouch bills on a per-project basis, rather than an hourly billing rate. Having a metric to judge the success of developers in completing a project will be useful as changes are made to the toolsets and processes, to see if they are driving the cost of deploying these projects down.

Use Cases

Use Case #1: Developer logs time spent

Developer will log-into their corporate wiki and go to the time logging page. A simple form will present itself, which will allow the developer to specify: (1) the project to log to (2) the task for that day and (3) time spent on the project (user can free input minutes or hours - the script converts to minutes always). The script will automatically log the timestamp (backdating will not be possible) and the user with this task.

Use Case #2: Project manager wishes to see hour logs

Project manager will be able to see dynamic data filtered by: 

  • Recent activity logs (past trailing week)
  • Recent activity by user (trailing two weeks)
  • Recent activity by project (all)

Functional Specification

Defining projects

Projects ebb and flow, and a process for marking projects as active should be defined. In order to maximize the custom behaviors of this feature, the "active projects" list will be maintained through page properties on the primary "Time Tracker" page. If a project is no longer active, it will simply be removed from the active selection list.

Expediting multiple entries

One of the primary use case is to simplify the time to log for conference calls. Since it makes no sense for four separate people to log their hours, it will be possible to attribute a single task to multiple users by appending to the task: "with @username1, @username2" or "w/ @username, @username2.

Simplifying entries

For future: Accept entries via Twitter (do some very crude parsing in the format "(time) on (project): (task)"

Inputting time

A free-form field; will accept formats: "30 minutes", "30 min", "30 mins", "4 hours", "1 hour"; a number by itself will be assumed to be minutes if > 8 or hours if <8. PHP's strtotime() function is quite diverse and can hit the basic use cases quite well.

Report Creation

Reports will be creatable for all projects, active or non-active. They are meant to provide archival data on old projects (you really only want to see dynamic dashboards of active projects) - by having them write data to MindTouch pages, they will be printable.

Viewing Reports

Reports will be shown visually in tabular format, with a summation of all time spent

Non-goals

This is not a full-blown project management tool. It is meant to be very simple, and to solve one problem: how much time was spent on a task. It will be geared to limit the time spent tracking/generated reports on hours.

This tool will also NOT break down a project into "activity types." Although our internal cost rates are separate for dev/PM/design, this will be a future optimization.

Developers will not be able to edit tasks - they will have to delete/re-add. This is to prevent "backdating" of projects - the task entries should be simple enough an edit interface is not necessary.

Technical Specification

This will be a MindTouch special page plug-in, which will rely on DekiScript to display the dynamic reports that are generated by the plug-in. It will resolve gracefully in the absence of JS, but will rely heavily on JS to speed up the UI. It's primary goal should UI speed - the time to complete either one of the tasks above should be no more than one click away.

From a URL standpoint, the script will live in a hierarchy like: 

  • /Time_Tracker/ (the main dashboard view for this)
    • /Reports/ (stores archived reports per-project - do a wiki.tree here to show all projects)
      • /Project 1/ - shows each individual project's time breakdown
      • ...
  • /Special:TimeTracker (the main PHP plug-in which does all the heavy scripting work)

UI requirements

/Time_Tracker/

Tasks that can be achieved on this page: (in order)

  1. Input hours
  2. See recent activity
  3. See all active project dynamic reports
  4. Generate static reports

Utilizes DekiScript to wrap around markup from the special page.

/Special:TimeTracker/

Tasks achievable from this page: 

  • Display input form
  • Process POST requests
    • Deleting
    • Posting
      • Parsing content (special behavior)
      • Saving to database
    • Generate reports
  • View reports
    • Recent activity
    • By user
    • By project

Database

Data will be stored in a mySQL database for quick retrieval.

CREATE TABLE IF NOT EXISTS `mindtouch_plugin_tasklogs` (
  `tasklog_id` int(10) unsigned NOT NULL auto_increment,
  `tasklog_userid` int(11) NOT NULL default '0',
  `tasklog_timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
  `tasklog_project` varchar(64) collate utf8_unicode_ci NOT NULL default '',
  `tasklog_task` text collate utf8_unicode_ci NOT NULL,
  `tasklog_duration` mediumint(8) unsigned NOT NULL default '0',
  `tasklog_duration_raw` varchar(64) collate utf8_unicode_ci NOT NULL default '',
  PRIMARY KEY  (`tasklog_id`),
  KEY `tasklog_userid` (`tasklog_userid`),
  KEY `tasklog_timestamp` (`tasklog_timestamp`),
  KEY `tasklog_project` (`tasklog_project`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

Some notes: 

  • Project will be indexed by text. A lookup table is an unnecessary optimization at this point.
  • Duration_raw will be the raw input of the time. Since this is a "magical" conversion, not losing that data will be important.
  • Tasks, although they have special post-processing involved, will be stored in raw format.

API requirements

None.

TODO

  • Backdoor "backdating" (need to migrate old data over)
  • Generating reports
  • SVN-friendly configuration
  • better date configuration
Tag page
You must login to post a comment.