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

Input field values for metadata declared with metadata.hide are hidden when opening a previously-saved submission #1997

Closed
uofmsean opened this issue Dec 8, 2022 · 3 comments · Fixed by DSpace/DSpace#9126

Comments

@uofmsean
Copy link
Contributor

uofmsean commented Dec 8, 2022

Describe the bug
DSpace 7.4 (Tested with Firefox 107 and Chrome 108)
The values for input form metadata fields declared with the metadata.hide configuration are hidden on first load of a previously-saved workspace submission. This will confuse the user as they will not see the value that was previously entered (although it was saved to the database). To further confuse matters, if any input field is modified, and the "Save" button is selected, the initially hidden metadata values will appear.

To Reproduce
Steps to reproduce the behavior:

  1. Declare a metadata field to be hidden via the appropriate metadata.hide parameter in local.cfg
  2. Declare an input field for the metadata (e.g., onebox) in a testable input form in submission-forms.xml
  3. Restart the UI and backend
  4. Log in as a non-Admin user and start a new submission using the test input form
  5. Enter a value for the "hidden" input field
  6. Select "Save for later"
  7. Verify that the database metadatavalue row is present (i.e., input value was saved)
  8. Edit the previously-saved submission
  9. The value for the input field will be blank
  10. Edit any other input field (to enable the Save button)
  11. Select Save
  12. The previously entered value for the input field is now displayed

Expected behavior
Any input field values for metadata declared with metadata.hide should be viewable at all times during an in-progress submission. The metadata.hide declarations should only take effect once the item has been archived. This is the behaviour in DSpace 6.x and allows a "protected" metadata value to be initially entered by the submitter but subsequently hidden from view (to non-Administrators) once the item has been archived.

Related work
Link to any related tickets or PRs here.

@uofmsean uofmsean added bug needs triage New issue needs triage and/or scheduling labels Dec 8, 2022
@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward component: submission medium priority Estimate TBD and removed needs triage New issue needs triage and/or scheduling labels Feb 22, 2023
@f-rapp
Copy link

f-rapp commented Sep 26, 2023

Hi, We noticed the same error.
We could not reproduce steps 10 to 12, though: the field stayed blank. We tested this for a workflow item.

@uofmsean
Copy link
Contributor Author

@f-rapp, I think for steps 10 to 12 it might have been Firefox filling in the fields automatically, although I haven't confirmed this yet.

@toniprieto
Copy link
Contributor

Something similar could happen when a local admin tries to add a hidden metadata. I think users with edit item permission should be able to see this metadata. I have just submitted a PR with this change.

@tdonohue tdonohue removed help wanted Needs a volunteer to claim to move forward Estimate TBD labels Oct 13, 2023
@tdonohue tdonohue added this to the 7.6.1 milestone Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

4 participants