RockefellerArchiveCenter / aurora

A Django web application to receive, virus check and validate transfers of digital archival records, and allow archivists to appraise and accession those records.
http://projectelectron.rockarch.org/
MIT License
25 stars 6 forks source link

Align transfer status indications across the UI #555

Open HaSistrunk opened 1 year ago

HaSistrunk commented 1 year ago

Is your feature request related to a problem? Please describe.

The transfer status on the Aurora /transfers page shows a progress bar and the exact status description. However, on the dashboard, each transfer status indication is binary with text indicating that it either passed or failed validation: Transfer by [user] passed/failed validation.

As we saw from bag 0c962a5a-0456-49c7-b7b1-58c1b24ce57c in a recent dev transfer, this can cause confusion for the user when the transfer status is "Transfer Completed" where the bag passed validation, but on the dashboard it says it failed validation.

Describe the solution you'd like

There are a few possibilities here. I think the idea of having this info on the dashboard is so that a user can quickly see if a bag was successfully transferred with no problems. We could adjust the text to have 3 options:

  1. Transfer by [user] is in progress if the transfer has a status of "transfer started" or "transfer completed". No red or green color.
  2. Transfer by [user] failed validation if the transfer has a status of invalid. Red color.
  3. Transfer by [user] passed validation if the transfer has any other status. Green color.

Describe alternatives you've considered

  1. We could also adjust the dashboard table to include the same transfer status column that is on the transfers page.
  2. A simple approach would be to edit the text on the dashboard to match the transfer status on the transfers page: Transfer by [user]. Status: [transfer status]

Additional context

There are currently 9 possible statuses in Aurora:

McDaPick commented 7 months ago

Hi All!

Going to take a look at this issue. I noticed there were a few proposed solutions and wanted to know which one you would prefer. I think the following is what I'm going to tackle today but let me know if I should switch gears at all.

  1. Transfer by [user] is in progress if the transfer has a status of "transfer started" or "transfer completed". No red or green color.
  2. Transfer by [user] failed validation if the transfer has a status of invalid. Red color.
  3. Transfer by [user] passed validation if the transfer has any other status. Green color.
helrond commented 7 months ago

Hey @McDaPick your approach makes sense to me, so have at it! You should have permissions to push to a branch on this repo; let me know if not and I'll get that sorted. Initial PR should point at development, not base. Thank you!

McDaPick commented 7 months ago

Awesome, that sounds great to me!

I was building out the new dashboard statuses and noticed that the Transfer model does not have the user_uploaded field anymore.

I searched through Aurora's commits and found a migration that removed the field from the Transfer model. 91ddf9e17b8dfb701570d6c2af25e72eb3d8fa0e

Would you all be opposed to having the field added back in? I'm not sure of the history on removing the field, so wouldn't want to reintroduce anything unneeded! I'll keep searching incase I missed another way of obtaining a transfer's user.

helrond commented 7 months ago

It took me a minute to remember this but I removed that field about a year ago when we rearchitected the transfer piece of the application.

It used to be that files were transferred to attached file storage via SFTP. The user credentials used by SFTP were the same ones used to log into Aurora, and there was all kinds of custom stuff done to SSH to redirect and jail users in a directory specific to their organization. In this case we could infer which user uploaded the files by looking at the user who owned the files and then looking for a matching username in the database. This all proved to be somewhat janky and full of security holes.

We moved to a different model where files are uploaded to an organization-specific S3 bucket. In order to reduce the number of users in AWS and tighten up security a bit, there is a per-organization AWS IAM user that has the necessary permissions to upload to that organization's bucket. In this case, we no longer meaningfully distinguish which Aurora user uploaded to a bucket. So that's why that field was removed.

Does that make sense? I don't think adding it back is possible; I would just remove that from the template (which I should have done myself).

McDaPick commented 7 months ago

Awh okay I see what you mean, totally makes sense!

Just thinking about what that would mean for the solution, would you prefer to have the organization be in the transfer messages? Something like this,

Transfer by the Archival Repository is in progress

helrond commented 7 months ago

Yeah, I like that approach!

McDaPick commented 7 months ago

Sounds great! I'll get that all set up.