Skip to content
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

limit relational field default value options to field's sources #1234

Merged
merged 1 commit into from
Feb 12, 2023

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Feb 10, 2023

Description

At the moment, when mapping relational fields for import, the default value modal shows all available sources and not just the sources allowed for the field.

This PR limits the default value option to the sources specified for the field. It’s applied to all relational fields supported by Feed Me, except for the assets field (as per our chat on 23/01/2023).

I’m worried that this could be considered a breaking change, though. Happy to discuss this further, and maybe it should be postponed until the Craft 5 release.

It can be applied to v4 and v5.

@i-just
Copy link
Contributor Author

i-just commented Feb 10, 2023

@i-just correct me if i'm wrong, but it looks like default behavior remains unchanged, unless you explicitly go in and change/resave field settings?

Yes, this change will only take effect if you create a new feed or edit the default value mapping for an existing field.

Example: let’s say you have 2 channels on your site: channelA and channelB; you have an entries field which is limited to only channelA; you have a feed that imports entries, and in that feed, you mapped this entries field to a default value; previously, you were able to choose a default entry from either channelA or channelB, despite the field being limited to just channelA; with this change, you will only be allowed to choose entries from channelA when choosing the Default value.

@angrybrad angrybrad merged commit 64e1a3c into v4 Feb 12, 2023
@brandonkelly brandonkelly deleted the feature/relational-field-default-value-amends-v2 branch March 17, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants