Problem/Motivation
Multiple values are being stored as a single field item with the selected values comma-separated as a single string value. This is a problem when working with Drupal entities/fields in entity queries etc. and also does not support field values with commas (which is technically possible, as a CiviCRM data processor is being used to retrieve allowed field values, which can be anything).
Proposed resolution
Multiple values should be stored as delta-based separate items for multi-value fields.
Remaining tasks
- Adjust behavior (do not
implode()/explode()values when storing/retrieving) - Convert already stored values with an upgrade task
User interface changes
Multiple values will be displayed as such, instead of a single item with a comma between the actual values.
API changes
Functionality relying upon the current behavior (exports, etc.) might have to be adjusted. @jaapjansma, @kainuk
Data model changes
Technically none, just using it correctly.
Issue fork cmrf_reference-3420426
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
jensschuppe commentedComment #6
jensschuppe commentedI added some more adjustments which seems to cover all places that display values of the CMRF Reference field, including forms (also multi-value fields on multi-step webforms), editing forms of submissions, display of submissions in both, table and single entity view.
There might be a configuration option needed for whether to actually query every field value when displaying a lot of them, as this causes API requests for each value.
@jaapjansma, @kainuk looking forward to your comments.
Comment #8
jaapjansma commented