iris-web icon indicating copy to clipboard operation
iris-web copied to clipboard

[BUG] Asset 'date_update' field is not updated after asset update

Open StaSys846 opened this issue 1 year ago • 1 comments

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:

  1. Create a new case asset and save the asset
  2. Re-open newly created asset and make modifications
  3. Save the modified asset
  4. 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 avatar Oct 30 '24 10:10 StaSys846

@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.

derickdiaz avatar Aug 21 '25 02:08 derickdiaz