magento-engcom / import-export-improvements

Open Software License 3.0
31 stars 29 forks source link

Magento modifies the SKU when creating products and SKU is already used #101

Open federivo opened 6 years ago

federivo commented 6 years ago

Preconditions

  1. Magento 2.x
  2. PHP 5.5 5.6 7.0 7.1
  3. MySql 5.5 5.6

Steps to reproduce

  1. Create a product with SKU "ABC"
  2. Then create another product with the same SKU "ABC"

Expected result

  1. It should alert the user with an error message that the SKU is already in use by another product

Actual result

  1. Magento appends a "-1" to the SKU and saves it.
federivo commented 6 years ago

As discussed in Feb 16th import/export meeting, @dmanners will discuss this with a Magento product owner to consider changing actual behavior regarding SKU management.

federivo commented 6 years ago

Approved by @piotrekkaminski. Moving forward with this issue.

orlangur commented 6 years ago

@federivo @piotrekkaminski what about SKU autogeneration for a new product? As far as I remember current behavior when SKU was left empty and autogenerated one was already in use is to show warning "SKU was changed to ABC-1" or something like that.

I don't see this case covered in linked PR.