dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Bring back possibility to enter free text in “Edit Item”, even when input forms are associated with a vocabulary

Open MW3000 opened this issue 1 year ago • 4 comments

Describe the bug

In DSpace 8, in “Edit Item” (<dspace>/items/<id>/edit/metadata), if a metadata field is associated with a controlled vocabulary (list or hierarchical) in the submission form, it is no longer possible to enter free form text in such a field in “Edit Item”, as there is the same vocabulary presented as in the submission forms as the only option.

While we offer controlled vocabularies to help our submitters to pick e.g. reasonable licenses, it is crucial that our editorial staff has the possiblitly to enter free form text in those fields, to accomodate more advanced use cases.

Screenshot 2024-10-28 at 14 36 46

This change leads us to the situation were metadata editing has to be done on database level, or via the Rest API or a CSV export/import operation!!! This is an extremely serious bug for us.

To Reproduce

Steps to reproduce the behavior:

  1. Associate a controlled vocabulary with an input field in submission-forms.xml like <input-type value-pairs-name=“publication-licenses">dropdown</input-type>
  2. Choose to edit this field under <dspace>/items/<id>/edit/metadata
  3. Try to enter a free form text!

Expected behavior

It is essential that with “Edit Item” there is a possibilty to add free from text beyond a controlled vocabulary.

Possible solutions would be:

  1. Return to the old behaviour, where no controlled vocabularies were presented in “Edit Item”
  2. Add the option to enable or disable the use of controlled vocabularies for “Edit Item”
  3. Add the option to edit free form text in addition to pick from a controlled vocabulary

MW3000 avatar Oct 28 '24 13:10 MW3000

It might have been introduced here: https://github.com/DSpace/dspace-angular/pull/2653

MW3000 avatar Oct 28 '24 14:10 MW3000

@MW3000 : Yes, I believe this was implemented in #2653 by @toniprieto . But, the bug you are detailing might be specific to the dropdown field because that's one of the few fields which doesn't allow free-text entry in the Submission form. So, if the field allows free text entry in Submission, then it will allow it in this Item Edit. But, you are rightly pointing out that if the field does not allow free-text entry in Submission, then "Edit Item" will also block that ability.

I'm not sure of the best solution myself, but maybe there'd be a way to allow "Edit Item" to also support free-text entry, even if the controlled vocabulary is a dropdown.

In any case, I've pulled this over the maintenance board to see if we can find a volunteer.

tdonohue avatar Oct 28 '24 14:10 tdonohue

Oh, I hadn’t thought of this issue. I'll try to send a possible solution in the coming days. I had considered adding a button to enable free text input, something like this:

enable-free-text

As a workaround, an uncontrolled value could now be added by following these steps:

  • Delete the current one
  • In the text area for entering new metadata, input the desired value (without having selected the metadata field)
  • Then select the metadata field to enter (in this case, dc.rights.uri)
  • Save the new value

toniprieto avatar Oct 28 '24 15:10 toniprieto

Thank you, @toniprieto. The solution with the button seems very good to me. Also thank you for the workaround.

Together with an option to edit free form text, it is a big win to have controlled vocabularies in “Edit Item”

MW3000 avatar Oct 28 '24 20:10 MW3000