Hi All,
While doing an upgrade for our DSpace environment to version 4.2 I came across
an issue where for the BTE submission lookup was only using fields defined in
the default form (as defined in input-forms.xml). As the system only records
the fields that have been defined in the input form this is problematic. I
found that the source of the issue is that the 'getInputs' method expects a
collection handle rather than a form name which is what is being sent. This is
certainly still an issue in version 5.
To fix this issue I changed the following:
In org.dspace.submit.lookup.DSpaceWorkspaceItemOutputGenerator:
private DCInput getDCInput(String formName, String schema, String element,
String qualifier) throws DCInputsReaderException
{
DCInputSet dcinputset = new DCInputsReader().getInputs(formName);
...
To:
private DCInput getDCInput(String formName, String schema, String element,
String qualifier) throws DCInputsReaderException
{
DCInputSet dcinputset = new
DCInputsReader().getInputsForForm(formName);
...
In org.dspace.app.util.DCInputsReader:
public DCInputSet getInputs(String collectionHandle)
throws DCInputsReaderException
{
String formName = whichForms.get(collectionHandle);
if (formName == null)
{
formName = whichForms.get(DEFAULT_COLLECTION);
}
...
To:
public DCInputSet getInputs(String collectionHandle)
throws DCInputsReaderException
{
String formName = whichForms.get(collectionHandle);
return getInputsForForm(formName);
}
public DCInputSet getInputsForForm(String formName)
throws DCInputsReaderException
{
if (formName == null)
{
formName = whichForms.get(DEFAULT_COLLECTION);
}
...
I'm not sure what the process is to get this fixed in the code base/get a JIRA
issue raised but if I need to do anything please let me know.
Regards,
Genevieve
------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette