medusajs/medusa

[Bug]: ProductModuleService updateProductOptionValues is a no-op

Open

#14878 opened on Mar 11, 2026

View on GitHub
 (5 comments) (0 reactions) (0 assignees)TypeScript (22,539 stars) (2,090 forks)batch import
good first issuetype: bugversion: 2.0

Description

Package.json file

{
  "dependencies": {
    "@medusajs/admin-sdk": "2.11.3",
    "@medusajs/cli": "2.11.3",
    "@medusajs/framework": "2.11.3",
    "@medusajs/js-sdk": "2.11.3",
    "@medusajs/medusa": "2.11.3",
    "@medusajs/types": "2.11.3",
  },
  "devDependencies": {
    "@medusajs/test-utils": "2.11.3",
  }
}

Node.js version

v20.19.2

Database and its version

PostgreSQL 18.3

Operating system name and version

Windows 11

Browser name

No response

What happened?

I called ProductModuleService.updateProductOptionValues. The second parameter, data gets overwritten by a medusa context because of code in the LocalWorkflow class:

https://github.com/medusajs/medusa/blob/c7e799d090934b63a951d39deb0aafecd811fd32/packages/core/orchestration/src/workflow/local-workflow.ts#L110-L134

Specifically, the issue is that MedusaService is assigning the updateProductOptionValues method in the same way as all other update methods, that is, having a context in the second argument (index 1), while updateProductOptionValues has it in the third argument (index 2):

https://github.com/medusajs/medusa/blob/c7e799d090934b63a951d39deb0aafecd811fd32/packages/core/utils/src/modules-sdk/medusa-service.ts#L202-L216

Expected behavior

Calling ProductModuleService.updateProductOptionValues will update the product option values.

Actual behavior

Any data input to ProductModuleService.updateProductOptionValues is dropped and a medusa context replaces it, effectively rendering the method a no-op.

Link to reproduction repo

https://github.com/medusajs/medusa

Contributor guide