magento2
magento2 copied to clipboard
Fixed bugs and add improvements for Newsletter Queue
Description
This PR fixes bugs and add improvements for Newsletter Queue functionality
Preconditions
- For correct testing you should have more then 20 subscribers in
newsletter_subscriber
table - Create new Newsletter Templates in Marketing->Newsletter Templates
- Create new Newsletter Queue
https://user-images.githubusercontent.com/13517181/129901984-3874092d-06de-4142-9a2d-f350befdb1fc.mov
Issue case 1
Actual result
- Run
bin/magento cron:run --group=default
,newsletter_send_all
cron job should run Newsletter Queue - You will see that 20 emails were sent but we still have Not Sent status

- I don't see any actions except Preview

Result after fix
Was fixed by appliing next changes https://github.com/magento/magento2/pull/33849/files#diff-1d2d0f2340ff4fc3e0907e98b2ccd1a21a35c777c503907bc3c12f0223eaeb8eR254
Correct status was set, i can see Pause, Cancel , Preview actions for queue

Issue case 2
- After Issue case 1 was fixed next issue was reproduced
Actual result
All data were removed from Newsletter Queue after clicking Save and Resume button
https://user-images.githubusercontent.com/13517181/129911385-51cd3ae5-a676-4649-90f7-0176550e2f92.mov

Result after fix
Was fixed by appliing next changes https://github.com/magento/magento2/pull/33849/files#diff-f4e00fe342edaab019fbb62abfa0c2b8f5d7a2f179bd5880e4c217d57bbb7883R232
Data was saved correctly all data present
https://user-images.githubusercontent.com/13517181/129914043-f9a78778-f169-481c-b907-1b6a7dad6057.mov
Issue case 3
Actual result
- Save and Resume button always display even while creating new Newsletter Queue

Result after fix
Was fixed by appliing next changes https://github.com/magento/magento2/pull/33849/files#diff-d337328a9078b6f37102b714ffa5460b365c7ede7b97ca644bf2f0b8fe15b0dcR138
- Save and Resume button displays only if Newsletter Queue has status Pause
https://user-images.githubusercontent.com/13517181/129914610-f2be7644-a867-40f8-af93-0424de400b15.mov
Hi @Usik2203. Thank you for your contribution Here are some useful tips how you can test your changes using Magento test environment. Add the comment under your pull request to deploy test or vanilla Magento instance:
-
@magento give me test instance
- deploy test instance based on PR changes -
@magento give me 2.4-develop instance
- deploy vanilla Magento instance
: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 Compare
-
Functional Tests CE
-
Functional Tests EE
, -
Functional Tests B2B
-
Integration Tests
-
Magento Health Index
-
Sample Data Tests CE
-
Sample Data Tests EE
-
Sample Data Tests B2B
-
Static Tests
-
Unit Tests
-
WebAPI Tests
-
Semantic Version Checker
You can find more information about the builds here
:information_source: 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.
:warning: According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: 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.
:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel
:pencil2: 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.
@magento give me test instance
@magento give me test instance
Hi @engcom-Charlie. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Charlie, here is your Magento Instance: https://3cba4c94c32bbcd522c1f3907ab57bdd.instances.magento-community.engineering Admin access: https://3cba4c94c32bbcd522c1f3907ab57bdd.instances.magento-community.engineering/admin_461c Login: 319d58d3 Password: a1db48bf7a25
@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.
@engcom-Charlie Will you help with updating PR?
Hi @Den4ik,
Yeah, will work on the review comments and on build failures.
Thank you!
@engcom-Charlie That's great 👍
@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.
@magento run Unit 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.
@magento run Functional Tests CE test
Failed to run the builds. Please try to re-run them later.
@magento run Functional Tests CE
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.
Hi @Den4ik,
Thank you for your contribution!
With respect to your review comment, currently magento have no service contract/repository implementation for this module. Hence for this PR we have to consider the provided approach only but we will surly convey your thought to the core team and the PO. But for this PR we have to go with the given approach.
Apart from that if you please go ahead and complete the review process so that we can proceed it further to Ready For Testing.
Meanwhile I am looking into the build failures.
Thank you!
@magento give me test instance
Hi @engcom-Charlie. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Charlie, here is your Magento Instance: https://3cba4c94c32bbcd522c1f3907ab57bdd.instances.magento-community.engineering Admin access: https://3cba4c94c32bbcd522c1f3907ab57bdd.instances.magento-community.engineering/admin_cb27 Login: c34d2007 Password: f9829d6850e5
@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.
@magento give me 2.4-develop instance
Hi @Den4ik. Thank you for your request. I'm working on Magento instance for you.
Hi @Den4ik, here is your Magento Instance: https://381893b02a9273e4719e026924d84c31.instances.magento-community.engineering Admin access: https://381893b02a9273e4719e026924d84c31.instances.magento-community.engineering/admin_b6ba Login: 727d869b Password: b11b7e37de6c
Fixed all test failures apart from functional test failure.
AdminEditCustomerWithAssociatedNewsletterQueueTestCest.xml is the functional test which is currently failing.
After analysis found that, the mentioned test is not failing because of changes made in PR or not part of the PR changes. It's related to the WYSIWYG editor.
@Den4ik, requesting you to review the PR so that we can move further for testing. Moving it to Review In Progress.
Thank you!