magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Shipping Address email field is being replaced with the billing address email #34614

Open rahimimo opened 2 years ago

rahimimo commented 2 years ago

Preconditions (*)

  1. Reproducable on Magento CE 2.4.3-p1
  2. Using REST API of magento

Steps to reproduce (*)

When creating an order out of guest cart is being done, the shipping email is being replaced by the billing email.

  1. Create a guest Cart using a POST request to this endpoint https://magento.test/rest/default/V1/guest-carts
  2. Add an item to creared the guest cart using this endpoint https://magento.test/rest/default/V1/guest-carts/{created-guest-cart-step-1}/items? example body { "cartItem":{ "sku": "sample-sku", "qty": "1" } }
  3. Add shipping info using this endpoint a POST request to: https://magento.test/rest/default/V1/guest-carts/{created-guest-cart-step-1}/shipping-information example body
    {
    "addressInformation": {
    "billingAddress": {
      "country_id": "FI",
      "street": [ "Testikatu 1 C 44" ],
      "company": "",
      "telephone": "0",
      "postcode": "02230",
      "city": "Espoo",
      "firstname": "Siamak Rahimi Motem",
      "lastname": "Siamak Rahimi Motem",
      "email":"billing@address.co"
    },
    "shippingAddress": {
    "country_id": "FI",
    "street": [ "Testikat" ],
    "company": "",
    "telephone": "0",
    "postcode": "15877",
    "city": "gisha",
    "firstname": "Mona",
    "lastname": "Pourdeljoo",
    "email": "shipping@adress.co",
    "same_as_billing": 0
    },
    "shipping_method_code": "flatrate",
    "shipping_carrier_code": "flatrate",
    "extension_attributes": {}
    }}

    Up to this point if you use GET Cart endpoint you can see this shipping@adress.co email. BUT, if you create an order, that email is no longer can be retrieved.

  4. Make a PUT request to create order endooint https://magento.test/rest/default/V1/guest-carts/{created-guest-cart-step-1}/order
  5. Get Order using a GET request to https://magento.test/rest/default/V1/orders/{created-order-number-step5}

Expected result (*)

It is expected that the billing address does not leak to the shipping address.

  1. [Screenshots, logs or description]

Actual result (*)

  1. Screenshot 2021-11-11 at 18 52 27

    You see on fetching the order instead of shipping email, the billing email is being replicated.

  2. Before creating the order that email can be seen from get guest cart end point Screenshot 2021-11-11 at 18 51 58

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 2 years ago

Hi @rahimimo. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, 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

Usik2203 commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @Usik2203. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @Usik2203, here is your Magento Instance: https://6e5c89f8c1545f2c78eb82a91f656dfc-2-4-develop.instances.magento-community.engineering Admin access: https://6e5c89f8c1545f2c78eb82a91f656dfc-2-4-develop.instances.magento-community.engineering/admin_bcdc Login: 0177cb03 Password: 212d2595a428

m2-assistant[bot] commented 2 years ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

m2-assistant[bot] commented 2 years ago

Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Hotel commented 2 years ago

Hello @rahimimo,

Thanks for posting this issue!

We have tried to reproduce this issue in the Magento 2.4-develop branch, and it is reproducible for us with the given steps. We have also tried to check the root cause of the issue and found that the data in table sales_order_address has the billing@address.co value for the row. Please have a look at the below screenshot for reference: 1

Hence confirming the issue.

Thanks

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1759 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 years ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

isxam commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @isxam. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @isxam, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

isxam commented 2 years ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 years ago

Hi @isxam. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 years ago

Hi @isxam, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

pablomishchenko commented 2 years ago

@magento I am working on this