[SPIKE] Show updated time for files #1084
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a spike on one possible approach to #1061. There is a bit of a challenge in showing meaningful date information with regard to files on a work in H3 as we do not persist them in the database permanently, they are transient for display on the work form.
This approach sets the
content_file.updated_at
value to theupdated_at
value of the work. This at least allows the files table to display relatively accurate date content for a file based on the last time the work was deposited or edited.Then when uploading new files, the
updated_at
value is accurate to the time the individual file record is created during the work edit session.The attached screen recording shows that an existing file is displaying a date from yesterday, and then the new file gets the current date and time... And then uploading a file with the same name as the existing file updates it's time to show that it was altered.
This may be an incomplete approach at this time, but shows how we may be able to provide meaningful/helpful information in this way.
Screen.Recording.2025-03-14.at.3.42.56.PM.mov