Skip to content
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

fix(medusa) : Improperly referenced product id in product import strategy #2351

Merged
merged 13 commits into from
Oct 7, 2022

Conversation

ayushthe1
Copy link
Contributor

@ayushthe1 ayushthe1 commented Oct 5, 2022

@ayushthe1 ayushthe1 requested a review from a team as a code owner October 5, 2022 06:55
@changeset-bot
Copy link

changeset-bot bot commented Oct 5, 2022

🦋 Changeset detected

Latest commit: b2176be

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/medusa Patch

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

@ayushthe1
Copy link
Contributor Author

@shahednasser Could you please review this pr .

@shahednasser
Copy link
Member

@ayushthe1 I only review documentation-related PRs. Please wait while someone from the engineering team gets the chance to review it 😊

@ayushthe1
Copy link
Contributor Author

@ayushthe1 I only review documentation-related PRs. Please wait while someone from the engineering team gets the chance to review it 😊

Thanks .. sorry for bugging you 😅.

@adrien2p adrien2p requested a review from fPolic October 5, 2022 10:11
@ayushthe1 ayushthe1 changed the title fix/issue #2350 fix/issue #2350 : Improperly referenced product id Oct 5, 2022
@olivermrbl olivermrbl changed the title fix/issue #2350 : Improperly referenced product id fix(medusa) : Improperly referenced product id in product import strategy Oct 6, 2022
Copy link
Contributor

@fPolic fPolic left a comment

Choose a reason for hiding this comment

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

LGTM @ayushthe1! Appreciate the contribution 🚀

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM!

@kodiakhq kodiakhq bot merged commit d8a5942 into medusajs:develop Oct 7, 2022
adrien2p pushed a commit that referenced this pull request Oct 11, 2022
…tegy (#2351)

* What - fixing PR #2350 

* Why - In the ProductImportStrategy class, the getImportInstructions improperly checks the product.id for each row. With it setup this way, products will always be considered new because the product.id column is not read here. So products will never be updated. [Link to the code line](https:/medusajs/medusa/blob/bd941309161bcee4fbfc7918d310c426ba8d8f15/packages/medusa/src/strategies/batch-jobs/product/import.ts#L166)

* How - Replacing `row["product.product.id"]` to  `row["product.id"]`

Co-authored-by: Oliver Windall Juhl <[email protected]>
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.

5 participants