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.

Command icon 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

jensschuppe created an issue. See original summary.

jensschuppe’s picture

Assigned: jensschuppe » Unassigned
Status: Active » Needs review

jensschuppe changed the visibility of the branch submissionDisplayValues to hidden.

jensschuppe changed the visibility of the branch multipleValues to hidden.

jensschuppe’s picture

I 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.

jaapjansma’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.