sul-dlss / happy-heron

Self-Deposit for the Stanford Digital Repository (SDR): H2 is a Rails web application enabling users to deposit scholarly content into SDR
Apache License 2.0
10 stars 2 forks source link

Only items that have been accessioned before should display the UI element with the user version options #3606

Closed amyehodge closed 3 months ago

amyehodge commented 3 months ago

When a collection has the review workflow on, if a user submits an item for approval and the reviewer rejects the item and returns it to the depositor, when the depositor goes in to make changes to the draft item, they are seeing the versioning options box with the yes/no checkboxes and the what's changing entry field. Since this item has never been deposited and accessioned, they should not be seeing this.

Screenshot 2024-08-19 at 3 40 03 PM

To reproduce:

  1. In a collection with the review workflow on, create an item and submit it for review.
  2. Return the item to the user for modification.
  3. Open the item up for further editing, and you'll see the versioning options at the top of the page even though this item has never been accessioned before.
amyehodge commented 3 months ago

The versioning options are no longer showing up for works that haven't been accessioned, so that seems to be working perfectly now.

However, it now seems that already accessioned works that are returned are also not showing the versioning options. The user sees it until they submit the work for review, but if it is returned, they no longer see it.

This is a problem if the user has done something like add a file the first time they edit and had to choose the "yes" option, but then when revising they remove the file and decide they don't want the new version and would like to choose "no." They no longer can make any changes to their selection or their comment, which now may be inaccurate.

Using https://sul-h2-qa.stanford.edu/works/122 as the example. This item has already been accessioned (multiple times).

  1. Click pencil icon to edit.
  2. Versioning options show up. This is correct.
  3. This happens with either selection, but I'm going to choose "yes" and enter the comment "added a file."
  4. Added a second file.
  5. Submitted for approval.
  6. Back on the view page, I click "Return" and add a reason, then click "Submit."
  7. I'm taken to the dashboard where I click on the pencil next to this work.
  8. Edit form loads but the versioning options are no longer there, so the user can't switch this to "no" or update the comment.
  9. Remove the extra file (or not, doesn't matter at this point), and click "Submit for approval."

You can keep sending this back to the user for changes but they never see the versioning options again.