feat(product-category): add external_id to product-category#14799
Open
asgerjensen wants to merge 1 commit intomedusajs:developfrom
Open
feat(product-category): add external_id to product-category#14799asgerjensen wants to merge 1 commit intomedusajs:developfrom
asgerjensen wants to merge 1 commit intomedusajs:developfrom
Conversation
🦋 Changeset detectedLatest commit: 53e0dbc The changes in this PR will be included in the next version bump. This PR includes changesets to release 76 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 |
|
@asgerjensen is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
integration-tests/http/__tests__/product-category/store/product-category.spec.ts
Show resolved
Hide resolved
6d39e37 to
33f1dbc
Compare
It is available on both /admin and /store, and can be used as filter. fix: add missing snapshot test: fix race condition in test
33f1dbc to
53e0dbc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What — What changes are introduced in this PR?
This PR adds
external_idto theproduct-categorytype.It is available on both /admin and /store, and can be used as filter.
Why — Why are these changes relevant or necessary?
To facilitate runtime lookup from values derived from 3rd party systems (PIM, ERP, Recommendations, CMS-stored-references) of the product-category.
Allows addressing data via its native/real-world identifier, rather than synthetic/instance-specific database identifier.
How — How have these changes been implemented?
Added migration to add field. Added field to schemas and queryInfo blocks.
Testing — How have these changes been tested, or how can the reviewer test the feature?
Integration tests included.
Examples
Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.
This helps with documentation and ensures maintainers can quickly understand and verify the change.
Checklist
Please ensure the following before requesting a review:
yarn changesetand follow the promptsAdditional Context
Add any additional context, related issues, or references that might help the reviewer understand this PR.
Note
Medium Risk
Introduces a schema change and expands API query/filter surface area; low logic complexity, but migrations and new filter parameters can affect production data and query behavior.
Overview
Adds a nullable
external_idtoproduct_categoryend-to-end: new DB migration + model field, updated type definitions/DTOs, and API validation/query configs soexternal_idis returned by default and accepted on create/update.Enables filtering product categories by
external_idin both Admin and Store list endpoints, with expanded integration test coverage (new store tests plus admin/service test updates) and a changeset bumping affected packages.Written by Cursor Bugbot for commit 53e0dbc. This will update automatically on new commits. Configure here.