Skip to content

Commit

Permalink
8.6.5
Browse files Browse the repository at this point in the history
- Mark readonly fields for migrated fields with delta values.
  • Loading branch information
pookmish authored Sep 11, 2024
1 parent 27f43c1 commit 16f3474
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: PHPUnit Coverage Tests
runs-on: ubuntu-latest
container:
image: pookmish/drupal8ci:latest
image: pookmish/drupal8ci:php8.3
services:
mysql:
image: mysql:8.0
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
# DRUPAL_DATABASE_PASSWORD: drupal
# DRUPAL_DATABASE_HOST: mysql
# container:
# image: pookmish/drupal8ci:latest
# image: pookmish/drupal8ci:php8.3
# options: '--network-alias drupal8ci'
# services:
# mysql:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
# DRUPAL_DATABASE_PASSWORD: drupal
# DRUPAL_DATABASE_HOST: mysql
# container:
# image: pookmish/drupal8ci:latest
# image: pookmish/drupal8ci:php8.3
# options: '--network-alias=drupal8ci'
# services:
# selenium:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Stanford Migrate

8.6.5
--------------------------------------------------------------------------------
_Release Date: 2024-09-11_

- Mark readonly fields for migrated fields with delta values.

8.6.4
--------------------------------------------------------------------------------
_Release Date: 2024-08-08_
Expand Down
2 changes: 1 addition & 1 deletion stanford_migrate.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'Adds more functionality to migrate and migrate plus modules'
type: module
core_version_requirement: ^10.3 || ^11
package: 'Stanford'
version: 8.6.4
version: 8.6.5
dependencies:
- drupal:migrate
- empty_fields:empty_fields
Expand Down
5 changes: 2 additions & 3 deletions stanford_migrate.module
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ function stanford_migrate_entity_form_display_alter(EntityFormDisplayInterface $

$field_definitions = $form_display->get('fieldDefinitions');
foreach ($form_display->getComponents() as $field_name => $component) {

// Make sure the field component is one of the field definitions.
if (empty($field_definitions[$field_name])) {
continue;
Expand All @@ -97,12 +96,12 @@ function stanford_migrate_entity_form_display_alter(EntityFormDisplayInterface $
// fields that are mapped from migration as readonly.
$field_definition = $field_definitions[$field_name];
$columns = $field_definition->getFieldStorageDefinition()->getColumns();
$processing = !empty($migration->process[$field_name]);
$processing = !empty($migration->process[$field_name]) || !empty($migration->process["$field_name/0"]);

// This will check if a migrate process is mapped to a specific column on
// the field.
foreach (array_keys($columns) as $column) {
$processing = $processing ?: !empty($migration->process["$field_name/$column"]);
$processing = $processing ?: !empty($migration->process["$field_name/$column"]) || !empty($migration->process["$field_name/0/$column"]);
}

// If the migration destination has the `overwrite_properties` configured,
Expand Down

0 comments on commit 16f3474

Please sign in to comment.