collectiveaccess/providence — pull request #162 by kehh (2014-10-07 07:30:49+00:00)
Title: NOJIRA Support multivalue scalar values for interstitials on import

Prior to this you could either map values to an attribute in an interstitial using a refinery that would have the source data tree to contain values like:
# `array(array('locale_id' => 1, 'attributename' => 'attributevalue1'), array('locale_id' => 1, 'attributename' => 'attributevalue2'))` or like
# `array('attributename'=>'attributevalue')` - a simple scalar value, *but you couldn't provide*
# `array('attributename' => array('attributevalue1', 'attributevalue2', 'attributevalue3')` - an array of scalar values

This PR makes it possible to do the third option while retaining option 1 and 2

addRelationship and editRelationship use the same logic, so this just makes that bit of the code a bit dryer. addRelationship and editRelationship currently only come from the data importer, not via the interstitial editor in the UI. We've got an import plugin (https://github.com/wamuseum/providence/tree/develop/app/plugins/wamDataImporter) that puts the source data into the array of scalar values format but it's very specific to our use case so we're not pushing it upstream (although you're welcome to whatever bits you want of it). Anyway this plugin relies on this code change so it would be great if you could merge this but we are also happy to maintain this on our fork.

Also thanks for merging all the other PR's ;)