The following is more about how how time entries should be stored within the application and how they are linked to other parts of the system, not about the interface used for tracking time, that’s a post in itself.
Time can be tracked in one of 2 ways:
- Time can be tracked against a task, allowing you to add multiple time entries to the same item
- It can be tracked in isolation, meaning not linked to a task or other item in the system, other then a project. These will need an additional description of what’s done, so as to give the time entry some context
As time entries of the second type are isolated entries, you may have several entries for what is effectively the same “task” if it is done over several sessions. It must also be possible to do the same with time tracked on a task, but these would need to be linked, giving a total time for the task.
There are several options for how to model this in the database:
- Single table with all the fields and an optional column linking to the task
- 2 tables – One for isolated time entries and one for task based time entries
- 2 tables – One for aggregate time entries and one for the sub entries which link to it
In each case, the total time for a task would be calculated on the fly, even if we have a seperate table for such entries.
For each time entry, we need to collect the following information
- Date
- Time
- Estimated time – Optional
- Comments – Needed if it’s not linked to a task
- User who submited the time
- Which account and project it is part of
- Which task this is linked to – Optional