-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#4040 Map Enterprise Attributes during Trellis Events import #4053
base: issue/4039-add-enterprise-attributes-to-events
Are you sure you want to change the base?
#4040 Map Enterprise Attributes during Trellis Events import #4053
Conversation
…ub.com:az-digital/az_quickstart into issue/4039-add-enterprise-attributes-to-events
…sue/4040-map-enterprise-attributes-during-trellis-event-import
…sue/4040-map-enterprise-attributes-during-trellis-event-import
Here's a up to date copy of the output from migrate_devel
|
One oddity I notice about the Event search API is that the Format attribute is available, but it is as a top level field and not in the attributes array:
|
...custom/az_event/az_event_trellis/config/install/migrate_plus.migration.az_trellis_events.yml
Outdated
Show resolved
Hide resolved
…e_plus.migration.az_trellis_events.yml
…e_plus.migration.az_trellis_events.yml
…y.node.az_event.default.yml
…e_plus.migration.az_trellis_events.yml
…sue/4040-map-enterprise-attributes-during-trellis-event-import
In testing this mapping, I think I found two separate issues. The import mapping adds references for the parent terms like Audience, Topic, etc - but the Attribute field widget does not allow these terms to be selected, only the child terms. I think the import should only set the child terms, the parent terms are enforced by the widget config. On the matching news config, parent terms don't get referenced, only the child terms. The second is that after saving the event again, the attributes are empty and are lost. This definitely appears to be related to the field being disabled for trellis events - I'm uncertain why this happens because other widgets besides this one don't lose their value when disabled. Maybe it's a product of the transformations that happen to the data on saving with the Attributes widget. Example field data before the additional save (the first few ids are the parent terms that probably should be tagged):
And after the additional save:
Note that it seems like the target ids have been replaced by the delta or something...0 and 1 were not referenced originally. I'm guessing that if the widget is disabled, something in the Widget's massage form values fails. |
0399bc0
to
5b83a31
Compare
…sue/4040-map-enterprise-attributes-during-trellis-event-import
...custom/az_event/az_event_trellis/config/install/migrate_plus.migration.az_trellis_events.yml
Outdated
Show resolved
Hide resolved
…e_plus.migration.az_trellis_events.yml
…e_plus.migration.az_trellis_events.yml
…sue/4040-map-enterprise-attributes-during-trellis-event-import
…nt-import' of github.com:az-digital/az_quickstart into issue/4040-map-enterprise-attributes-during-trellis-event-import
...custom/az_event/az_event_trellis/config/install/migrate_plus.migration.az_trellis_events.yml
Outdated
Show resolved
Hide resolved
…e_plus.migration.az_trellis_events.yml
Description
This pull request adds updates existing configuration to account for config drift and a new migrate process plugin to process enterprise attributes called AZEnterpriseAttributesArrayFlatten.php
This plugin takes API data in the form of
And transforms it to
This then needs to be flattened again, in order to be used.
In the migration for field_az_enterprise_attributes on events, we use entity_lookup (not
entity_generate
) to find existing enterprise attributes and map them up. These can be entered manually, or imported using the import module. (Note: this is not a migration lookup)Release notes
Related issues
Close #4040
How to test
Enable:
Go to /admin/structure/taxonomy/manage/az_enterprise_attributes/overview to ensure enterprise attributes have been enabled.
Go to /admin/trellis-event-importer and import some events.
Now you can check that the imported events have the appropriate enterprise attributes.
Types of changes
Arizona Quickstart (install profile, custom modules, custom theme)
Drupal core
Drupal contrib projects
Checklist