inventory
inventory copied to clipboard
Default to the default source provider
Description (*)
Set the sourceCode to the default source provider's code by default. The sourceCode attribute is assumed to be populated even though there is no path if a shipment object has no sourceCode and single source mode is not enabled. This can result in an undefined variable error if a feature is not fully accounting for MSI. Ideally this should point to the source with the highest priority, but pointing it at the default source still seems like a better option than pointing it at no source.
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
- Create a shipment object without a sourceCode set.
- Setup multiple sources.
- Trigger the SourceDeductionProcessor.
Questions or comments
Contribution checklist (*)
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [x] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] All automated tests passed successfully (all builds are green)
@magento run all tests
@magento run all tests
@JaysonDeMarchi thanks for your contribution.
Please cover your changes with tests. In this way, we can also better understand the problem.
Thanks