-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(medusa): Align product import and export #2471
Conversation
🦋 Changeset detectedLatest commit: 3e2738c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
453c4e2
to
4e20f83
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work so far @adrien2p!
I've identified a couple of things to change. Also, I am faced with the following error upon exporting products, changing product title, and import the same file again:
Error: The csv file parsing failed due to: Unable to treat column Sales channel 1 Name from the csv file. No target column found in the provided schema
at ProductImportStrategy.<anonymous> (/Users/oliverjuhl/Desktop/medusa/medusa-import/node_modules/@medusajs/medusa/dist/strategies/batch-jobs/product/import.js:349:31)
at step (/Users/oliverjuhl/Desktop/medusa/medusa-import/node_modules/@medusajs/medusa/dist/strategies/batch-jobs/product/import.js:59:23)
at Object.throw (/Users/oliverjuhl/Desktop/medusa/medusa-import/node_modules/@medusajs/medusa/dist/strategies/batch-jobs/product/import.js:40:53)
at rejected (/Users/oliverjuhl/Desktop/medusa/medusa-import/node_modules/@medusajs/medusa/dist/strategies/batch-jobs/product/import.js:32:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
type: 'invalid_data',
code: undefined,
date: 2022-10-20T11:10:07.886Z
}
My server has Sales Channel feature enabled, which might be the culprit to the issue.
packages/medusa/src/strategies/batch-jobs/product/types/columns-definition.ts
Outdated
Show resolved
Hide resolved
packages/medusa/src/strategies/batch-jobs/product/types/columns-definition.ts
Outdated
Show resolved
Hide resolved
packages/medusa/src/strategies/batch-jobs/product/types/columns-definition.ts
Outdated
Show resolved
Hide resolved
packages/medusa/src/strategies/batch-jobs/product/types/columns-definition.ts
Outdated
Show resolved
Hide resolved
packages/medusa/src/strategies/batch-jobs/product/types/columns-definition.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition! Spotted a bit of clean up to be done
packages/medusa/src/strategies/__tests__/batch-jobs/product/export.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good to merge when tests are passing 💪
Oh actually, can I get you to add a changeset 😅 @adrien2p |
**What** Create a data structure that facilitate the addition of new column descriptor for both export and import and ensure that the column name is shared between bother import and export to facilitate the import with an exported file. **Tests** Add an additional integration tests that export a file, update the data, and re import the same file FIXES CORE-716 FIXES CORE-713
What
Create a data structure that facilitate the addition of new column descriptor for both export and import and ensure that the column name is shared between bother import and export to facilitate the import with an exported file.
Tests
Add an additional integration tests that export a file, update the data, and re import the same file
FIXES CORE-716
FIXES CORE-713