fix(loyalty): omit product options in denomination updates#16116
fix(loyalty): omit product options in denomination updates#16116ryanngit wants to merge 1 commit into
Conversation
Keep denomination values on variants while removing the unsupported product-level options field from update payloads. Add focused regression coverage, plugin test wiring, and a patch changeset.
🦋 Changeset detectedLatest commit: 02efc6f The changes in this PR will be included in the next version bump. This PR includes changesets to release 79 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 |
|
Thanks for the contribution! Initial automated review looks good. Focused fix for the linked good-first-issue bug: drops the unsupported product-level options field from the gift-card denomination update payload while keeping the per-variant options mapping. PR template is complete, change is small and scoped, and a regression test asserts the exact mutation payload. Suggest a quick manual check that adding a brand-new denomination value still succeeds now that the product-level options declaration is gone (variant options should upsert the value), though existing behavior likely handles this. Triggered by: new PR opened |
|
Validation of the new-denomination path found that missing option values are not upserted by the variant update. Separate option-link and product-update requests are not atomic, so the current patch should not merge yet. Maintainers, would you prefer an atomic Product Module/workflow extension in this PR or a separate core PR? |
Summary
What - Removes the unsupported product-level
optionsfield from gift card denomination update payloads. Variant denomination options remain unchanged. This also adds focused regression coverage and a package-local Vitest task.Why - Product update validation rejects product-level
options, so denomination edits submit an invalid payload.How - Builds the update payload from variants only and asserts the exact mutation payload in the regression test.
Testing - No Docker or containers used.
Examples
Not applicable; this corrects the submitted mutation payload shape.
Checklist
Additional Context
Changeset:
@medusajs/loyalty-pluginpatch. Existing pending changesets make the aggregate changeset status report a minor bump for this package.Closes #15742