Model History
Add to models history. should contain: who did it, what (pref diff format) and when. Also any item that is related to a UI facing item, i.e. the itam components. Should also have a history record added when a child object is added/removed.
Details
Any CRUD operation is to record the action including a diff if applicable. A single table is all that's required to store the history of all items with it's display being filtered to the item in question.
Display of the history will be from within the items view page, with a history icon level with the content title to the right of the screen (htmlfloat: right
). Upon clicking on this icon the UI will redirect to the history view page where in the full item history will be available. Within the history view, any child items (i.e. for a device software installs, software version changes etc) will also be included so as to have a full picture of the item in question. This history will not be editable by anyone, including super admin
. This is to ensure that the integrity of the history is maintained.
Only on deletion of a model will the the history be deleted. This is with the exception, that if a child item is deleted and the parent still exists, the child items history will still be kept until the parent item is deleted.
The following items must have history:
-
Users -
Groups -
Organizations -
Teams -
ALL ITAM models
Database fields
-
before
original fields in json format only required if data changed -
after
fields after change in json format only required if data changed -
text
-
add/delete
null
-
change
diff of change
-
-
action
What CRUD action add, update or delete -
user
user who conducted action -
created
DTG of the action -
an additional row per model, where the history is to be tracked the
PK
of the model
Icons
Requirements
-
Each model records the following:
-
Creation -
Change, in diff format
-
-
in the history view, the child item changes are included in the parent items history. -
Deletion of child models doesn't delete history if parent still exists. i.e. for a device: if the software is deleted, the history will remain so the device can see the history of the software
Tasks
-
Plan feature