Skip to content

Conversation

@arendarenko
Copy link
Contributor

@arendarenko arendarenko commented Oct 9, 2018

Description

If in some cases (for example: after migration data from M1) customer will have store_id = 0 and there are subscriber that related to this customer, after re-saving customer data, it might cause unexpected "unsubscribe" letter which would confuse customer experience.

My changes solves this problem because of adding additional checking storeId and if it's 0, getting it directly from the website.

Manual testing scenarios

  1. Create new customer
  2. Create customer
  3. Go to MySQL and set store_id = 0 in customer_entity table for this customer
  4. Go to MySQL and create record in newsletter_subscriber for this customer but with correct store_id and subscribe_status = 1.
  5. Go to backend -> Customers and open it for edit
  6. Change some customer data (for example, name) and save user

Expected result:
Nothing, except saving customer data, will happen

Actual result:
Customer will receive unsubscription letter.

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)
  • All automated tests passed successfully (all builds on Travis CI are green)

@arendarenko arendarenko changed the title Fix issue with unexpected unsubscription Fix issue with unexpected changing of subscription status after customer saving Oct 9, 2018
@ihor-sviziev ihor-sviziev self-assigned this Oct 9, 2018
Update module logic when customer have store_id = 0
Fix unit tests according to new logic
Add integration tests for case when customer have store_id = 0
@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Oct 13, 2018
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-3183 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @alexeya-ven. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants