Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Present uploader name rather than submission owner name under ALL FILES Name field #1960

Open
smutniak opened this issue Sep 10, 2024 · 2 comments

Comments

@smutniak
Copy link
Contributor

Vireo3 shows the name of the uploader for a submission's documents. Vireo4 lists under ADD FILES Name field (in view page) the name of the submitter rather than the file uploader. This is hardcoded in line 77 of src/main/webapp/app/views/admin/view.html

This is a request of an admin from one of the TDL hosted sites.

@smutniak
Copy link
Contributor Author

If i, as [email protected], upload a file on an existing submission i am properly credited with the upload. This information seems to be coming from service/AssetService.java and ActionLogRepo.java as the user name is taken from an action_log query. Even though the migration properly populates the user_id in action_log this does not get picked up for prior files. I notice the message ' // current best hack to identify the user whom originally uploaded the file' which leads me to believe this feature is not complete.

@smutniak
Copy link
Contributor Author

smutniak commented Oct 2, 2024

Upon further investigation there are 2 causes of this problem which result in the uploader name coming from the the default in view.html. The problem is in the AssetService.java file

  1. the 'fileIdentifier 'current best hack' line - this is not needed and the findBySubmissionIdAndEntryLikeAndBeforeActionDate method should just used 'name'
  2. the creationDate.setTimeInMillis(attr.creationTime().toMillis()) line which comes from the actual unix file datestamp and sets the time to filter by - in cases where data has been migrated from V3 the file date will be later than the date expressed in action_log

The solution is to, in all cases, remove the fileIdentifier hack. The second thing to fix this is either to change the creationDate.setTimeInMillis to zero (creationDate.setTimeInMillis(0);) OR, create a ruby script to go through each action log representing a file upload and set the unix timestamp accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant