Skip to content
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

#14663 Updating Customer through rest/all/V1/customers/:id resets group_id if group_id not passed in payload #25958

Conversation

MaxRomanov4669
Copy link
Contributor

Description (*)

While updating customer through api customer group is changed to 1 if there no customer group in the body

Fixed Issues (if relevant)

#14663

Manual testing scenarios (*)

  1. Update any customer who's group_id isn't the first group_id in the source list
  2. Pass the customer payload with email, firstname, lastname, website_id, id

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)

@m2-assistant
Copy link

m2-assistant bot commented Dec 9, 2019

Hi @MaxRomanov4669. 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.

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-6500 has been created to process this Pull Request
✳️ @VladimirZaets, 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-Charlie
Copy link
Contributor

Hi @MaxRomanov4669

Due to Magento Definition of Done all code must be covered by tests. Please cover your fix by automated tests.

Thanks!

@engcom-Charlie engcom-Charlie added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label Dec 19, 2019
@MaxRomanov4669
Copy link
Contributor Author

Hi @VladimirZaets @engcom-Charlie
Can you please clarify/help how can I cover my fix with tests?
function setCustomerGroupId - private function.
$customerModel - created inside save function
$customerArr - created inside save function
$prevCustomerDataArr - created inside save function

Thanks!

@engcom-Golf engcom-Golf self-assigned this Jan 2, 2020
@engcom-Golf engcom-Golf added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests labels Jan 2, 2020
@engcom-Golf
Copy link
Contributor

All changes covered by unit test

@engcom-Delta
Copy link
Contributor

✔️ QA passed

@engcom-Golf
Copy link
Contributor

Functional test fails on 2.4-develop branch, fix in -> #26225

magento-engcom-team pushed a commit that referenced this pull request Jan 3, 2020
…id resets group_id if group_id not passed in payload #25958
@magento-engcom-team magento-engcom-team merged commit 3bce77f into magento:2.4-develop Jan 3, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jan 3, 2020

Hi @MaxRomanov4669, 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.

@sdzhepa sdzhepa mentioned this pull request May 9, 2022
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.

7 participants