Skip to content

Scoped identity at product alert email #26534

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

Merged
merged 13 commits into from
Jul 11, 2020

Conversation

maqlec
Copy link
Contributor

@maqlec maqlec commented Jan 24, 2020

Description (*)

Price/stock alert email was always sended with identity from default store. I fixed that identity sets from store where alert is subscribed

Manual testing scenarios (*)

  1. Subscribe to price/stock alert on other store than default
  2. When notification is sended to customer, as a sender will be contact from scoped store

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

Resolved issues:

  1. resolves [Issue] Scoped identity at product alert email #28968: Scoped identity at product alert email

@m2-assistant
Copy link

m2-assistant bot commented Jan 24, 2020

Hi @maqlec. Thank you for your contribution
Here is 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

For more details, please, review the Magento Contributor Guide documentation.

Copy link
Contributor

@Stepa4man Stepa4man left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @maqlec
Thanks for your contribution

Please check the test failures.

@ghost ghost assigned Stepa4man Jan 25, 2020
@maqlec maqlec requested a review from Stepa4man January 27, 2020 06:13
@maqlec
Copy link
Contributor Author

maqlec commented Jan 27, 2020

@Stepa4man failing tests are unrelated to changes. Is there a way to retest only one of them?

@maqlec maqlec force-pushed the alert-sender-scope-fix branch from 34efe00 to da04422 Compare May 2, 2020 16:51
@maqlec
Copy link
Contributor Author

maqlec commented May 2, 2020

Hi @maqlec
Thanks for your contribution

Please check the test failures.

all checks have passed :)

Stepa4man
Stepa4man previously approved these changes May 2, 2020
@magento-engcom-team
Copy link
Contributor

Hi @Stepa4man, thank you for the review.
ENGCOM-7506 has been created to process this Pull Request
✳️ @Stepa4man, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@magento-engcom-team
Copy link
Contributor

@maqlec thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@engcom-Delta engcom-Delta self-assigned this May 6, 2020
Copy link
Contributor

@engcom-Delta engcom-Delta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maqlec Due to Magento Definition of Done all code must be covered by tests.
Seems like new behavior not covered by existing dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php test

@ghost ghost dismissed Stepa4man’s stale review May 6, 2020 07:11

Pull Request state was updated. Re-review required.

@engcom-Echo engcom-Echo self-assigned this May 6, 2020
@maqlec maqlec requested a review from engcom-Delta May 10, 2020 12:11
@maqlec
Copy link
Contributor Author

maqlec commented May 10, 2020

@engcom-Delta failed tests are not related to changes

@Stepa4man
Copy link
Contributor

@magento run all tests

@Stepa4man
Copy link
Contributor

Hi @maqlec,

Please add to all changed (created) php files

    declare(strict_types=1);

You can read more here

@engcom-Echo engcom-Echo force-pushed the alert-sender-scope-fix branch from 045659b to a50dcf5 Compare June 9, 2020 11:39
@engcom-Echo
Copy link
Contributor

@magento run all tests

@Stepa4man Stepa4man added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Jun 10, 2020
@magento-engcom-team
Copy link
Contributor

Hi @Stepa4man, thank you for the review.
ENGCOM-7506 has been created to process this Pull Request
✳️ @Stepa4man, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Delta
Copy link
Contributor

✔️ QA passed

Manual testing scenario:

  • Create second store view
    image
  • Change Sender Email for Second Store View
    image
  • Configure price/stock alert
    image
  • Set Display Out of Stock Products=Yes
    image
  • Create two simple products, one of them is Out of Stock
  • Create customer
  • Change view to Second Store view on frontend
  • For product In Stock, click "Notify me when the price drops" for subscribe to price alert on frontend
    image
  • For product Out of Stock, click "Notify me when this product is in stock" for subscribe to price alert on frontend
    image
  • Go to admin panel
  • Set lower price for product In Stock
  • Set Stock Status=In Stock for product that was Out of Stock
  • Change local date to next day
  • Run cron:run twice
  • Check customer mail

Before:
Sender Email is from default view
#26534MainStock
#26534MainPRice

✔️ After:
Sender Email is from view where customer was subscribed for alerts(from Second Store View)
#26534PRStock
#26534PRPrice

@engcom-Echo engcom-Echo added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label Jul 1, 2020
@engcom-Delta
Copy link
Contributor

@magento create issue

@engcom-Delta engcom-Delta added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jul 2, 2020
@slavvka slavvka added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Jul 8, 2020
@slavvka slavvka added this to the 2.4.1 milestone Jul 8, 2020
@magento-engcom-team magento-engcom-team merged commit 03eff10 into magento:2.4-develop Jul 11, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jul 11, 2020

Hi @maqlec, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: ProductAlert Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] Scoped identity at product alert email
6 participants