0

I can add a vocabulary to a metadata in the submission form while creating an item. However, when I try to edit the item, I do not see the vocabulary to select the value from. I could not find any documentation relating to customizing the edit form for an item. Can anyone point me to the right direction? I am using version 6.x of DSpace.

Screenshot of edit item form

1

Screenshot after enabling authority control

2

vimuth
  • 5,064
  • 33
  • 79
  • 116
  • If you enabled controlled vocabulary for that specific metadata, there should be a lookup button beside that metadata entry (assuming it is subject type metadata and not dropdowns like type and language). – euler Aug 19 '22 at 06:41
  • Thank you for your reply. As you pointed out, there is a lookup button beside that metadata in the submission form when I first create a metadata(as an author/submitter) but I only see the textarea with the entered values when I try to edit the item's metadata (as an editor/administrator) after an item is already created and approved. – Kiran Dhakal Aug 19 '22 at 06:46
  • Assuming you use the vocabulary `srsc` for `dc.subject`, you have to tell DSpace the plugin to use, e.g. `choices.plugin.dc.subject = srsc`. Please see my answer below. Hope this helps. – euler Aug 19 '22 at 07:58

1 Answers1

0

You can only see the lookup button beside that metadata in the submission form because that is for the submission process only. You have to tell DSpace that that metadata is authority controlled. Please see this link: Authority Control of Metadata Values

Assuming we will use srsc as the controlled vocabulary, your settings should look like below. Note the last line, e.g. authority.controlled.dc.subject= true, that tells DSpace that the dc.subject field is authority controlled. You can find this settings in dspace.cfg under the ##### Authority Control Settings ##### header but you can override it by putting it in local.cfg.

## demo: subject code autocomplete, using srsc as authority
## (DSpaceControlledVocabulary plugin must be enabled)
## Warning: when enabling this feature any controlled vocabulary configuration in the input-forms.xml for the metadata field will be overridden.
choices.plugin.dc.subject = srsc
choices.presentation.dc.subject = lookup
vocabulary.plugin.srsc.hierarchy.store = true
vocabulary.plugin.srsc.hierarchy.suggest = true
vocabulary.plugin.srsc.delimiter = "::"
authority.controlled.dc.subject= true    

Also, make sure that DSpace Controlled vocabulary is enabled, i.e., webui.controlledvocabulary.enable = true and:

plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority = \
   org.dspace.content.authority.DCInputAuthority, \
   org.dspace.content.authority.DSpaceControlledVocabulary

exists.

euler
  • 1,401
  • 2
  • 18
  • 39
  • Thank you for pointing me to the right direction. I read the document in the link that you shared. I made the changes in the file dspace.cfg as per your suggestion. choices.plugin.dc.subject = srsc choices.presentation.dc.subject = lookup vocabulary.plugin.srsc.hierarchy.store = true vocabulary.plugin.srsc.hierarchy.suggest = true vocabulary.plugin.srsc.delimiter = "::" authority.controlled.dc.subject = true However, I can't see the Lookup button as given in the screenshot in the document. Did I miss anything else? – Kiran Dhakal Aug 19 '22 at 08:18
  • @KiranDhakal Did you restart the Tomcat service? – euler Aug 19 '22 at 08:40
  • Yes I did restart the Tomcat service. I can see the Thumbs up icon and lock/unlock button. But I am not able to see the Lookup button. – Kiran Dhakal Aug 19 '22 at 08:45
  • I have added the screenshot of the form after the configuration changes in the question. – Kiran Dhakal Aug 19 '22 at 09:00
  • @KiranDhakal, Make sure controlled vocabulary is enabled, i.e. `webui.controlledvocabulary.enable = true`. Don't forget to restart Tomcat if you edit this in `dspace.cfg`. – euler Aug 19 '22 at 11:59
  • Thank you for the suggestion. I can now see the Lookup button after I enabled the controlled vocabulary and uncommented the lines `plugin.selfnamed.org.dspace.content.authority.ChoiceAuthority = \ org.dspace.content.authority.DCInputAuthority, \ org.dspace.content.authority.DSpaceControlledVocabulary` in the file dspace.cfg. But when I click on the Lookup button, I see a flat list of terms and not a hierarchical list. I am not sure why. – Kiran Dhakal Aug 21 '22 at 11:09
  • @KiranDhakal, unfortunately, the hierarchical structure is only displayed during the submission process (based from my experience when using the controlled vocabulary xml). – euler Aug 22 '22 at 01:13