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

Created on 12 Apr 2018  路  8Comments  路  Source: magento/magento2


Preconditions


  1. Magento Version 2.2.3 using rest API
  2. Passing a JSON payload with minimum required data (email, first/last name, website_id, id)

Steps to reproduce

  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

Expected result

  1. I expect that only the data passed in the payload would be modified
  2. Example: {"customer":{"email":"[email protected]","firstname":"magento","lastname":"user","website_id":1,"id":77486}} should leave the customer's full data structure unchanged.

Actual result

  1. If the above customer had a group_id of 5, and our full group_id consisted of [1,2,3,4,5], the customer's group_id after passing the above payload would be set to 1:

Before:
image

PUT:
image

Results:
image

dmcdindia1 Fixed in 2.1.x Confirmed P4 ready for dev Reproduced on 2.1.x Reproduced on 2.2.x Reproduced on 2.3.x S4 Dev.Experience bug report

Most helpful comment

Hi @abancroft0. Thank you for your report.
The issue has been fixed in magento/magento2#14757 by @ferrazzuk in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.15 release.

All 8 comments

@magento-engcom-team was able to replicate this. Ok if I self assign?

Hi @ferrazzuk
Sure, feel free to assign it to yourself if you feel like trying and fixing this

Thanks!

@magento-engcom-team pull request created.

Hi @abancroft0. Thank you for your report.
The issue has been fixed in magento/magento2#14757 by @ferrazzuk in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.15 release.

Hi @jignesh-baldha. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

Hi @milindsingh. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

Hi @KishorkumarKar. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • [ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team I have fixed this issue. Creating the PR #22700.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kirashet666 picture kirashet666  路  3Comments

salelsol picture salelsol  路  3Comments

andreaskoch picture andreaskoch  路  3Comments

punkstar picture punkstar  路  3Comments

BenSpace48 picture BenSpace48  路  3Comments