Skip to content

magento/magento2#11953: Product configuration creator does not warn about invalid SKUs #12737

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

Merged
merged 2 commits into from
Dec 22, 2017

Conversation

zamoroka
Copy link
Member

@zamoroka zamoroka commented Dec 15, 2017

Description

  • Added validation for SKU field inside "Configurations" tab
  • Validation requires this field to be not empty and less than SKU_MAX_LENGTH from Sku model

Fixed Issues (if relevant)

  1. Product configuration creator does not warn about invalid SKUs #11953: Product configuration creator does not warn about invalid SKUs

Manual testing scenarios

Preconditions

  1. Magento CE 2.2.0 with sample data is installed by Composer.

Steps to reproduce

  1. In Admin go to Stores -> Attributes -> Product -> Add New Attribute
  2. Create an attribute with input type "Text Swatch" and values "Base" and "With Free Storage Kit" (sufficiently long).
  3. In Admin go to: Catalog -> Products -> Add Product
  4. Set name to "Sony Alpha a7R III Mirrorless Digital Camera (Body only)" e.i. something sufficiently long, near 64 characters, which is the limit for SKU field.
  5. Leave the SKU as automatically filled (the same as the name).
  6. (If you would append " (With Free Storage Kit)" to the name, the SKU field would appear red/invalid warning about the maximum length of 64 characters.)
  7. Save the product.
  8. Open that same product and click on "Create Configurations".
  9. Choose the attribute that was just created and "Next".
  10. Select both swatch values and "Next".
  11. Select whatever images, price, quantity and "Next".
  12. Click on "Generate Products".

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 on Travis CI are green)

AndrewMun and others added 2 commits December 15, 2017 14:28
…lid SKUs

- Added validation for SKU field inside "Configurations" tab
…lid SKUs

 - Make sku field as required
 - Length of sku gets from Sku model
@magento-engcom-team magento-engcom-team added mageconf Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Dec 15, 2017
@zamoroka zamoroka requested a review from BaDos December 15, 2017 13:00
@dmanners dmanners self-assigned this Dec 18, 2017
@dmanners dmanners added this to the December 2017 milestone Dec 18, 2017
@dmanners
Copy link
Contributor

@zamoroka thank you for this PR. Could you please sign the CLA and then we can process this PR.

@magento-team magento-team merged commit 7418f1a into magento:2.2-develop Dec 22, 2017
magento-team pushed a commit that referenced this pull request Dec 22, 2017
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Dec 22, 2017
@forwells
Copy link

I apply this method , but it not solve my problem...

@forwells
Copy link

but the sku validation worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Progress: accept Release Line: 2.2 Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants