Hi All,
I've done it, but you may not like the result!!
I have made major changes to simple.php.
Peter
1.
Assumptions in the design of simple.php V1.5.2
and earlier
1.
Times with the same client/project/task/description on each day
are consolidated for reporting, and then written back to the
database as just one record
2.
Times are rewritten to the database, with the start time reset to
midnight, hence destroying previous time details which could have
been entered using other time entry sheets.
3.
Database records are all deleted and re-inserted, leaving the
system exposed to failure.
4.
Time records can cross date boundaries, e.g. 11:00pm to 3:00am
5.
If a record is changed, then the order of the tasks in the simple
form is changed.
6.
Records get lost under unknown circumstances, perhaps when there
are too many lines to display?
1.
Proposed solution, change no. 338
1.
Each and every time record will be listed without consolidation.
Records for the same task/description will be listed across the
week, and down the screen. This means that multiple records
created in one day are listed separately.
2.
Time records will be updated for duration and end time, and other
values such as start time will be left un-touched. Where the
increased duration causes the end time to exceed midnight, the
record will be split into two records.
3.
New time records will be inserted, and split across two or more
days as necessary
4.
New time records will be inserted with a start time of midnight.
5.
Modified time records will be updated in place rather than being
deleted and re-inserted.
6.
Database times will now be in UTC – are they already?
7.
Minimal changes to limit the impact on other forms
8.
If a record is submitted or approved, it will not be alterable in
any of its details
9.
These changes may have unintended consequences on other timesheet
forms, so those forms may need adjusting
Please note that not all of the proposed solution items have been
implemented yet. The changes I am making to simple.php and
simple_action.php are still in progress. There still may be bugs in the
code. The splitting of records across midnight has yet to be
implemented. The submission of time records doesn't yet result in them
being unalterable.
*Crossing Date Boundaries
*The current implementation allows times records to record times
crossing midnight, or even many days. I propose changing this in the
near future to split such records before they are written into the
database so that no record crosses a midnight boundary, nor has a
duration greater than 24 hours.
*UTC*
The database records are not written in UTC as far as I can fathom from
reading the mysql details. But it's not at all clear to me yet. In any
case we have to plan to change the system to keep time records in UTC
and convert them to the local time format when they are read. By doing
this, we can then implement a future feature where each user can see his
records in his local timezone, and we can properly support users in
multiple timezones recording their timesheets.
|