Skip to content

32911 fixed product import with url key with spaces #33088

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

SilinMykola
Copy link
Contributor

Description (*)

I changed \Magento\CatalogImportExport\Model\Import\Product class as suggested in issue and add integration test.

Fixed Issues (if relevant)

  1. Fixes CSV product import does not format url key when url_key column is used #32911

Manual testing scenarios (*)

  1. Create a product with sku: ABC
  2. Create import file
"sku", "url_key"
"ABC", "Test ABC 1 2 3"

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented May 27, 2021

Hi @SilinMykola. Thank you for your contribution
Here are 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label May 27, 2021
@magento-engcom-team magento-engcom-team added Component: CatalogImportExport Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels May 27, 2021
@SilinMykola
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @SilinMykola,
Could you review and fix the failing integration tests?

@SilinMykola
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@SilinMykola
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@magento run Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@SilinMykola
Copy link
Contributor Author

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@SilinMykola
Copy link
Contributor Author

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@SilinMykola
Copy link
Contributor Author

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@SilinMykola
Copy link
Contributor Author

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor

Den4ik commented Jun 7, 2021

@magento run Functional Tests EE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor

Den4ik commented Jun 7, 2021

Translit relate PR #33060

@magento-engcom-team
Copy link
Contributor

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

@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Jun 22, 2021

Thanks for the contribution @Den4ik, @ihor-sviziev and @SilinMykola!

I have tried reproducing the issue in 2.4-develop version before testing the given PR fix code. Issue is reproducible as per my understanding based on given issue/ PR description and below are the reproducible steps in detail:

  1. Added a new simple product (namely- ABC) in the Admin>Catalog>Product page. (Mentioned SKU : ABC)

  2. Exported the added file into csv and edited the CSV file content like: product name to ABC2 and url_key to ABC2 1 2 3 .

  3. Imported the edited CSV file.

  4. Validated the ABC2 product in the Product page and its url_key value

Expected:
url_key should be updated like: abc2-1-2-3

Actual:
Updated the same imported input text ie abc2 1 2 3
Here is the screenshot of the actual result
image

Note: Description is updated with only 2 columns in the csv ie with Product name and url key. Keeping only 2 columns in csv is going to be invalid file to import, and hence I included all other columns while importing.

Kindly let me know if I have to add/modify anything in my reproducible steps.

I will be continuing with my further testing scenarios/ process.

@engcom-Alfa
Copy link
Contributor

engcom-Alfa commented Jun 22, 2021

✔️ QA Passed

Manual Testing Scenarios:

  1. Imported with the simple product keeping url_key with "simpprod 1 2 3", Noticed that the imported product is properly update to "simpprod-1-2-3"

  2. Imported with the configurable product keeping url_key with "configprod 1 2 3", Noticed that the imported product is properly update to "configprod-1-2-3" (Associated simple products also not having any issues as such)

  3. Imported with the bundle product keeping url_key with "bundprod 1 2 3", Noticed that the imported product is properly update to "bundprod-1-2-3" (Associated simple products also not having any issues as such)

  4. Imported with the downloadable product keeping url_key with "downprod 1 2 3", Noticed that the imported product is properly update to "downprod-1-2-3" (Tried with attached file from device. Worked without any issues)

  5. Imported the products having url_key with more spaces inbetween like "bundprod 1 2 3", Noticed that the imported product is properly update to "bundprod-1-2-3"

  6. Imported with the new url key to the existing product like "edited 1 2 ", Noticed that the imported product is properly update to "edited-1-2"

Before: ✖️ applying changes provided in the PR, the url_key's space used to be updated as it is.

image

After: ✔️ If the url_key is having a space, auto replaces with hyphen

image

Above written manual scenarios cover testing the url_key update for different types of products as well.

@m2-assistant
Copy link

m2-assistant bot commented Jul 29, 2021

Hi @SilinMykola, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@SilinMykola SilinMykola deleted the 32911-product-imoprt-url-key-format branch July 29, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: test coverage Component: CatalogImportExport Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSV product import does not format url key when url_key column is used
5 participants