Related / Inherited Memberships: Custom fields not filled with data #15884
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In CiviCRM, a membership can be for a group of contacts that are connected by relationships. For example a household, or cooperation. One of them has a master membership. The membership of the others is derived from the master membership. Any change in the master membership must be copied to the other memberships. Unfortunately, this does not for custom fields. This issue is described on https://lab.civicrm.org/dev/core/issues/1365
Before
On updating the custom fields of the master membership are changed in the update, the others are left behind.
After
The custom fields of every membership follow the master, as expected.
Technical Details
In the code, there is an effort to do all the custom fields. Part of the strategy was to unset the technical keys of the custom field. But the custom field was stored in an array instead of a single value. So that is corrected.