Skip to content

Customer address is duplicated after setBillingAddressOnCart GraphQL mutation. #26884

Closed
@Mavlyan

Description

@Mavlyan

Preconditions (*)

  1. Magento 2.3.4

Steps to reproduce (*)

Do all steps via GQL:

  1. Authorize ( generateCustomerToken mutation)
  2. Create cart (customerCart query)
  3. Add product to cart (addSimpleProductsToCart mutation)
  4. Set billing address (setBillingAddressOnCart mutation).
    Important: save_in_address_book: true
input:{ 
   cart_id:"cart_id"   
   billing_address:{ 
      address:{ 
      ...
         save_in_address_book:true
      }
      same_as_shipping:true
   }
}

After this step customer address appears in customer_address_entity table.
Class \Magento\QuoteGraphQl\Model\Cart\Address\SaveQuoteAddressToCustomerAddressBook do that.

  1. Set shipping method and payment method to the cart.
  2. Place order (placeOrder mutation)

Expected result (*)

  1. Address from step 4 should appear in customer account (e.g. in backend).

Actual result (*)

  1. There is 2 equal addresses (from step 4) in customer account.
    two adresses

Additional info

Please, feel free to use the GraphQL Checkout tutorial to reproduce the issue

Metadata

Metadata

Assignees

Labels

Component: CustomerGraphQlComponent: GraphQLGraphQLFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReported on 2.3.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions