Here is an outline of my setup:

1. A form to edit projects
2. A list for customers
3. A list for minutes to track
4. The main form for time tracking and saving tracking time and
project data
5. A custom script that pulls the time data out of the pages and sums
it up.

All data is stored in data fields on individual pages.

First you pull up some project pages. The form provides data fields
for customers (pulled from the list), name of the project and some
project description (names, due to...). All project pages are saved in
one group p.nameofcustomer.timestamp

The main form is a page with a form that provides data fields for user
input like:

date - default: today
[text size=1 dd name='dd' value="[(time now %d)]"][text size=1 mm
name='mm' value="[(time now %m)]"][text size=2 yy name='yy'
value="[(time now %Y)]"]

Then two rows (from - to) with:
hour - default: [(time {now} "%H")]
minutes - pulled from the list and displayed as radio buttons:
[(list page=list.from fmt='[radio from[] "{+p}"]{+p}' join=" | ")]

As we are tracking project times for every ten minutes we have
00,10,20,30,40,50

Then a select field for the project:
[select zprojecturl][(search group=p.* exclude=projects,p.header
sort=p3 template=project)][select]

On submit this form creates a page with this url:
[session target z.{=yy}.{=mm}.{=dd}.{id}.{=stdvon}.{now}]

Each time tracking entry from every employee results in a page like
this. To make backup easier I set up folders for different years and
months (site.config).

Having this you can pull up some pages for the results and do some
searches:
- times tracked for december: search group=z.2008.12.*
- times tracked for employee karlh in december: search group=z.
2008.12.*.karlh.*
- times tracked for project xy in december: search group=z.2008.12.*
data="customer: xy"
- projects for customer xy: search p.nameofcustomer.*

etc

My custom script to sum up the tracked times is a very basic one.
The whole content of your pages is stored in one file - the index
file. For a search as mentioned above the script checks the index
file, looks for the keywords (a regular expression for keys like
project, dates, customers etc), pulls the times tracked into an array
(preg_replace), does some math (to minus from) and sums up the result.

I am sure there could be a better solution for the math that could be
released as plugin.

I do not think that the whole thing should be put in a single plugin,
as the forms should be easily customized for everyone.

Greetings, Martin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to