[BUG] Asset 'date_update' field is not updated after asset update
Describe the bug The date_update field of a case asset is not updated after asset update. This applies to versions of IRIS <=2.4.14
To Reproduce Steps to reproduce the behavior:
- Create a new case asset and save the asset
- Re-open newly created asset and make modifications
- Save the modified asset
- date_update field of the asset is not updated and remains at the creation date
Expected behavior Any asset modification should result in an update of the date_update field to the current modification storage time.
Additional context The field name date_update implies, that the field should be updated with the current time when the asset object is modified/updated. date_update field is set once during asset create, but never touched again in the code afterwards.
- date_update and date_added are set correctly during asset create (see source/app/datamgmt/case/case_assets_db.py line 46/47).
- date_update is not updated in the update routine (see source/app/datamgmt/case/case_assets_db.py line 105ff)
@StaSys846 when looking at the case_assets table, the last_updated timestamp is actually stored in the modification_history column. This column stores a json object to every update event with a unix timestamp. I do agree that the date_update field should be the latest timestamp of which an updated occurred for that asset.
I would like to take this on.