magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Fixed bugs and add improvements for Newsletter Queue

Open Usik2203 opened this issue 3 years ago • 30 comments

Description

This PR fixes bugs and add improvements for Newsletter Queue functionality

Preconditions

  1. For correct testing you should have more then 20 subscribers in newsletter_subscriber table
  2. Create new Newsletter Templates in Marketing->Newsletter Templates
  3. Create new Newsletter Queue

https://user-images.githubusercontent.com/13517181/129901984-3874092d-06de-4142-9a2d-f350befdb1fc.mov

Issue case 1

Actual result

  1. Run bin/magento cron:run --group=default , newsletter_send_all cron job should run Newsletter Queue
  2. You will see that 20 emails were sent but we still have Not Sent status
Screenshot 2021-08-18 at 16 37 28
  1. I don't see any actions except Preview
Screenshot 2021-08-18 at 16 44 20

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

Screenshot 2021-08-18 at 16 48 58

Issue case 2

  1. 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

Screenshot 2021-08-18 at 16 59 08

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

  1. Save and Resume button always display even while creating new Newsletter Queue
Screenshot 2021-08-18 at 17 04 30

Result after fix

Was fixed by appliing next changes https://github.com/magento/magento2/pull/33849/files#diff-d337328a9078b6f37102b714ffa5460b365c7ede7b97ca644bf2f0b8fe15b0dcR138

  1. 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

Usik2203 avatar Aug 18 '21 12:08 Usik2203

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:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. 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

m2-assistant[bot] avatar Aug 18 '21 12:08 m2-assistant[bot]

@magento run all tests

Usik2203 avatar Aug 18 '21 12:08 Usik2203

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

engcom-Charlie avatar Aug 03 '22 13:08 engcom-Charlie

@magento give me test instance

engcom-Charlie avatar Aug 04 '22 11:08 engcom-Charlie

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

engcom-Charlie avatar Aug 05 '22 10:08 engcom-Charlie

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?

Den4ik avatar Aug 05 '22 12:08 Den4ik

Hi @Den4ik,

Yeah, will work on the review comments and on build failures.

Thank you!

engcom-Charlie avatar Aug 05 '22 13:08 engcom-Charlie

@engcom-Charlie That's great 👍

Den4ik avatar Aug 05 '22 19:08 Den4ik

@magento run all tests

engcom-Charlie avatar Aug 08 '22 13:08 engcom-Charlie

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

engcom-Charlie avatar Aug 09 '22 06:08 engcom-Charlie

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

engcom-Charlie avatar Aug 09 '22 09:08 engcom-Charlie

Failed to run the builds. Please try to re-run them later.

@magento run Functional Tests CE

engcom-Charlie avatar Aug 09 '22 09:08 engcom-Charlie

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!

engcom-Charlie avatar Aug 09 '22 10:08 engcom-Charlie

@magento give me test instance

engcom-Charlie avatar Aug 09 '22 12:08 engcom-Charlie

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

engcom-Charlie avatar Aug 09 '22 12:08 engcom-Charlie

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

Den4ik avatar Aug 09 '22 13:08 Den4ik

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. image

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!

engcom-Charlie avatar Aug 10 '22 07:08 engcom-Charlie