-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[FEATURE] - Adds source model on saving of multiselect attribute #34537
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
[FEATURE] - Adds source model on saving of multiselect attribute #34537
Conversation
Hi @rensieeee. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Hello @rensieeee Could you please provide more details about the use cases and business value of this issue or what dev experience it will improve and how? We see the solution but we cannot understand what problem it solves Thank you in advance |
Hi @sdzhepa It's possible to create product attributes using rest api. Multiselect attributes require source models to work, which usually are written in code together with the attribute. However, this fix allows to create multiselect attributes using rest api, using the basic Table eav source model, making the restapi functionality fully compatible with all attribute creations. |
Following issue will need to be taken into account before this PR can be accepted I believe: #13156 (PR that fixed that) @rensieeee: does this PR write that source model to the database, or is it only used at runtime? |
Hi @hostep, Yes, this PR writes the source model to the database, but only on creation. It isn't reset or overwritten on save, so you can still alter it if you want to. |
@magento run Static Tests, Integration Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @rensieeee
Could you please fix failed integration and static tests
Thank you in advance
Hi I am closing this PR for now as it seems like it has become stale and still needs work. Please feel free to reopen if you wish to continue. Thanks! |
Description (*)
When creating a multiselect product attribute, the source model is empty by default. This isn't necessary and can be replaced with the default Table source model (\Magento\Eav\Model\Entity\Attribute\Source\Table).
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)