Islandora-Collaboration-Group / islandora_webform

islandora_webform
GNU General Public License v3.0
6 stars 8 forks source link

Mapping to multiple destination xml forms does not work #24

Open patdunlavey opened 8 years ago

patdunlavey commented 8 years ago

@DiegoPino found, while investigating this issue https://github.com/commonmedia/islandora_webform/issues/23, that while it is possible to designate different xml forms as ingest destinations for webform fields, it does not actually work when the ingest preview form is submitted.

This begs the larger question of whether it is necessary to support this case: ingesting to more than one xml datastream. In manual ingestion through the UI, you can only populate data in one xml datastream. (Normally, something like the MODS to DC xslt would then be used to populate the DC datastream from MODS.)

So I'm looking for feedback: Would it make most sense to require the person editing the webform settings to select one xml datastream to use for all field mappings? An implication in this decision would be that any existing IW-configured webforms would need to be updated. An automated update when the preexisting webform uses only one destination xml datastream should be possible, but if the webform fields are mapped to different xml forms, we would probably need to have our update hook remove the mappings entirely.

Thoughts?

DiegoPino commented 8 years ago

Right @patdunlavey. Currently, if users choose mappings (webform fields) from two different forms associated to the same DSID we have a slight problem.

The problem we would have here is data being overwritten because we would be submitting two different forms, which would generate two different XML output documents, each one with different form values:

Even when the basic functionality of Islandora does only allow one metadata form to be mapped to an ingest steps workflow i have done multi metadata workflows possible in the past (https://github.com/DiegoPino/islandora_more_metadata_xml_forms) but always pointing to different DSIDS. So ingesting to multiple XML files is right now possible in IW, but ingesting from multiple XML forms mappings to the same dsid is what we need to resolve.

But nothing is lost:

Anyway, all methods need testing. I would suggest by putting a documented warning about this, before making changes to the code. We can work on this as an improvement in the long run, it's an edge case anyway.

patdunlavey commented 8 years ago

Thinking about this a bit more, I'm not sure it actually makes sense to retroactively force resetting the field mappings. They will be no more broken than they are already, and in the great majority of cases there is no problem. So I think the sane solution here will be to institute the restriction to a single destination MODS datastream.