magento2
magento2 copied to clipboard
magento/magento2#39861: Shipment email not sent when submitted from Admin Order view despite being enabled in store configuration
Description (*)
\Magento\Shipping\Controller\Adminhtml\Order\Shipment\Save::execute
if (!empty($data['send_email']) && $this->salesData->canSendNewShipmentEmail()) {
$this->shipmentSender->send($shipment);
}
without the right 'store id' checks only default config value
Related Pull Requests
Fixed Issues (if relevant)
- Fixes https://github.com/magento/magento2/issues/39861
Manual testing scenarios (*)
- Set up a multi-website configuration where the default has shipment emails disabled
- Create an order in a secondary website that has shipment emails enabled
- Go to Admin > Sales > Orders
- Open the order from the secondary store
- Click on "Ship" button
- Fill in shipment details and check "Email Copy of Shipment"
- Submit the shipment
Questions or comments
Contribution checklist (*)
- [ ] Pull request has a meaningful description of its purpose
- [ ] All commits are accompanied by meaningful commit messages
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
- [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- [ ] All automated tests passed successfully (all builds are green)
Hi @KrasnoshchokBohdan. Thank you for your contribution! Here are some useful tips on how you can test your changes using Magento test environment. :exclamation: Automated tests can be triggered manually with an appropriate comment:
@magento run all tests- run or re-run all required tests against the PR changes@magento run <test-build(s)>- run or re-run specific test build(s) For example:@magento run Unit Tests
<test-build(s)> is a comma-separated list of build names.
Allowed build names are:
Database CompareFunctional Tests CEFunctional Tests EEFunctional Tests B2BIntegration TestsMagento Health IndexSample Data Tests CESample Data Tests EESample Data Tests B2BStatic TestsUnit TestsWebAPI TestsSemantic Version Checker
You can find more information about the builds here :information_source: Run only required test builds during development. Run all test builds before sending your pull request for review.
For more details, review the Code Contributions documentation. Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento run all tests
@magento run all tests
@magento run all tests
@magento run all tests
@magento run all tests
@magento run all tests
@magento run all tests
Hi @KrasnoshchokBohdan,
Thanks for the collaboration & contribution!
:heavy_check_mark: QA Passed
Preconditions:
- Install fresh Magento
2.4-develop
Steps to reproduce
- Set up a multi-website configuration where the default has shipment emails disabled
- Create an order in a secondary website that has shipment emails enabled
- Go to Admin > Sales > Orders
- Open the order from the secondary store
- Click on "Ship" button
- Fill in shipment details and check "Email Copy of Shipment"
- Submit the shipment
Before: :heavy_multiplication_x:
No mails regarding shipments
After: :heavy_check_mark:
Builds are failed. Hence, moving this PR to Extended Testing.
Thanks.
@magento run all tests
@magento run Functional Tests CE, Integration Tests, Unit Tests
@magento run Integration Tests
@magento run Integration Tests
The build is green now, hence moving this to Merge In Progress.
@magento run all tests
Moving it to Merge in progress