Skip to content

Fix SKU limit in import new products #18639

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

Conversation

ravi-chandra3197
Copy link
Contributor

@ravi-chandra3197 ravi-chandra3197 commented Oct 16, 2018

Description (*)

Fix SKU limit in import new product

Fixed Issues (if relevant)

  1. import new products via csv: products are created with empty value when strings are too long #17865: import new products via csv: products are created with empty value when strings are too long

Manual testing scenarios (*)

  1. prepare a correct csv to create new products via backend. Use short values (less then 71 characters) for name/sku for a few records, then use a longer strings ((more then 71 characters) for name/sku for other records.

  2. go to system > import:
    -- entity type = products
    -- import behaviour = add/update, skip error entries
    -- allow errors count = I tried with several numbers from 10 (default) to 500 but issue persists
    -- field separator = ; (semicolon)
    -- multiple value separator = , (comma, default)
    -- field enclosure = unchecked (default)

  3. Select the csv to import and run check data

  4. when strings are too long, I expect to see an error after I run check data. I also expect that import get blocked until all error are fixed so no products gets created until the check data allows you to proceed with the import.

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)

@magento-engcom-team
Copy link
Contributor

Hi @ravi-chandra3197. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

Copy link
Member

@slavvka slavvka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution!

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Oct 16, 2018
@magento-engcom-team
Copy link
Contributor

Hi @slavvka, thank you for the review.
ENGCOM-3203 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@ravi-chandra3197 thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@slavvka
Copy link
Member

slavvka commented Oct 17, 2018

hey @ravi-chandra3197 During testing the fix we encountered with the problem:

Manual testing scenario:

  1. Create simple product with SKU that contains 64 characters.
  2. Click Save.
  3. ✅ Product is successfully saved.
  4. Prepare a correct csv to create new product with SKU that contains 64 characters.
  5. Go to system > import:
    – entity type = products
    – import behaviour = add/update, skip error entries
    – allow errors count = I tried with several numbers from 10 (default) to 500 but issue persists
    – field separator = ; (semicolon)
    – multiple value separator = , (comma, default)
    – field enclosure = unchecked (default)
  6. Select the csv to import and run check data
  7. ❌ Validation error "Attribute sku exceeded max length in row(s): 1".

ℹ️ Problem is connected with strict comparison in line https://github.com/magento/magento2/pull/18639/files#diff-def2be563c3045d145e78b66496cbc02R74

@ravi-chandra3197 ravi-chandra3197 changed the title Patch 17865 2.3 develop Fix SKU limit in import new products Oct 18, 2018
@ravi-chandra3197
Copy link
Contributor Author

@slavvka can you review it
I have changed as per your suggestions now it allows the product with SKU that contains 64 characters.
and i have also update change on [Backport] Fix SKU limit in import new products #18591

@magento-engcom-team
Copy link
Contributor

Hi @slavvka, thank you for the review.
ENGCOM-3203 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @ravi-chandra3197. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants