-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fixed "Email Copy of Invoice", "Email Copy of Shipment" and "Email Copy of Creditmemo" Issues #30868
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
Conversation
Hi @gwharton. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, 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, please 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 |
Hi @gwharton, |
The checkbox is only present if the global setting is enabled (which actually makes the additional check to see if it is enabled before sending email a little redundant), however...... So the desired operation is? If the global setting is enabled, then the checkbox is visible, and checked by default. The user can uncheck if he doesn't want to send the email? If the global setting is disabled, the checkbox is not present and the email is not sent. That sounds fair to me. @ihor-sviziev I'll make that change, and update the failing integration test. Any idea on how to get around the Health Check test failure. Seems to be borking at the use of Registry in the unit tests? |
@gwharton, Technically "can send invoice email" or "can send credit memo email" should be kind of global. Seems like this global option was designed for automated email sending while such entity was created, but the checkbox in admin - for manual. I though doing smart thing - if the option is enabled - let's check the checkbox, otherwise - do not check it by default, but seems like I was wrong. Unfortunately I don't have enough time now in order to collect all the possible use cases in this area, but I believe all of them need to be checked to make sure we're not breaking any existing flow. Would be good if someone else could provide their feedbacks. |
No problem. Happy to standby. Its pretty easy to implement the logic. Its coming up with the right logic thats the difficult bit. Will await further instruction. If you are going to be able to send emails manually, with the global setting turned off, then the Template, Copy to etc global sales email settings need to be decoupled from the global enabled setting, as when the global setting is disabled, all of the email options disappear. |
@magento give me 2.4-develop instance |
Hi @aleron75. Thank you for your request. I'm working on Magento instance for you. |
Hi @aleron75, here is your Magento Instance: https://aec935f82d9674684453effe117752c8-2-4-develop.instances.magento-community.engineering |
I'm just going to drop a brain dump for you all to promote conversation on the item. Currently the system works as follows.
The PR proposes two changes.
So the question that now arrises is .... "Do we want to be able to send emails manually from the invoice/creditmemo/shipment creation pages when the global setting for emails (for the specified type) is disabled? i.e
I like the idea of decoupling the global enabled setting from the creation page checkbox, so when you are creating the invoice/creditmemo/shipment it just does what the checkbox says. If this is the case, then further work needs doing on the config page
|
app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml
Outdated
Show resolved
Hide resolved
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.
Please revert changes in setting checked state for checkboxes
Hi @ihor-sviziev, thank you for the review. |
✔️ QA Passed Main CaseManual testing scenario:
Before: ✖️ Email sent to Customer After: ✔️ Email was not sent to Customer Additional Cases
Actual Result: ✔️ An email was NOT received
Actual Result: ✔️ An email was NOT received
Actual Result: ✔️ An email was NOT received
Actual Result: ✔️ An email was received
Actual Result: ✔️ An email was received
Actual Result: ✔️ An email was received
Actual Result: ✔️ An email was NOT received
Actual Result: ✔️ An email was NOT received
Actual Result: ✔️ An email was NOT received |
✔️ QA Passed |
…and "Email Copy of Creditmemo" Issues #30868
Hi @gwharton, thank you for your contribution! |
Description (*)
Magento is not consistent with the operation of the "Email Copy of ......" Checkboxes on the Invoice, Creditmemo and Shipment creation screens in admin.
On the invoice screen, if the box is unticked, but the global setting in Sales Emails is set to enabled, the email still gets sent.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Unit test covered
Contribution checklist (*)