Comments (6)
Perhaps, best is to support this in the product for compliance with all sorts of rules and regulations, as the issue occasionally comes up.
from timetracker.
I was thinking that as well. The next question is: for the sake of code maintainability, does it make sense to introduce an ORM, so we can do audit trail in one place?
from timetracker.
What exactly are you suggesting? An additional audit log table where everything goes, when enabled?
from timetracker.
Yes. I propose it to be as simple as possible, with these fields:
- id - primary key
- user_id (foreign key to user)
- state (added / deleted / modified)
- type / name of db object
- old value - serialised object into JSON. empty in case record was added
- new value - serialised object into JSON, empty in case record was deleted
- table name - in case of nested objects, we keep just changes for parent. its up for discussion
- identity - primary key(s) of the object serialised into JSON so we can link it to the record in DB
- timestamp
we can than calculate differences for each change on the fly if needed (by iterating through objects properties) - for displaying to the user.
What do you think? I would prefer to have some kind of ORM, so this can be implemented to work "automagically", but it would be big enough task as it is, and maybe we move this to "phase 2".
from timetracker.
How about simply having created, created_by, created_ip, modified, modified_by, modified_ip fields for all entities in sql tables that matter (similarly to what we have in tt_groups, tt_users, and tt_log now). This looks pretty straightforward and does not over-complicate things.
created
datetime default NULL, # creation timestamp
created_ip
varchar(45) default NULL, # creator ip
created_by
int(11) default NULL, # creator user_id
modified
datetime default NULL, # modification timestamp
modified_ip
varchar(45) default NULL, # modifier ip
modified_by
int(11) default NULL, # modifier user_id
from timetracker.
Hi,
sorry for the late reply. Sadly this is not enough. We've checked out some options and I implemented a rudimentary support a while ago but did not create a merge request because feature is not finished.
You can check the changes here: https://github.com/avidenic/timetracker/tree/audit_log
When I find the time I will finish it - add UI, settings etc....
from timetracker.
Related Issues (20)
- Line No. 409 in DateField.class.php is crashing the PHP/Apache Server (Reports Menu) HOT 1
- Suggestion: Move users between groups HOT 3
- Trying to get in touch regarding a security issue HOT 6
- Enable ',' input to the duration field HOT 3
- PHP7 since which version? HOT 1
- [BUG] Incorrect visualization in Reports with disabled projects HOT 1
- Suggestion: Chart whole group HOT 1
- [Feature Request] Flag to let disable projects be available in the Reports page HOT 2
- [BUG] Disabling projects deletes correlation to assigned client HOT 4
- [Feature Request] Remove flag "Costs" from Reports page for normal user
- [Feature Request] Allow diffrent hourly rate depending on task HOT 1
- [HELP]Can't find php.ini while trying to expand the upload file size HOT 1
- [Feature Request] Put client association into projects settings HOT 3
- Updating User cause Fatal Error (500) - Javascript handleClientRole issue on user_edit.php HOT 6
- [BUG] Unable to set hours on Monday while using Weekly view HOT 6
- [BUG] Access Denied as a top manager when switching user from Weekly View HOT 1
- [BUG] Favorite reports missing when selecting another user as a manager / top manager HOT 4
- Uncaught db error if task description is too long
- Clicking on reports give error 500 HOT 1
- Site dark? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from timetracker.