Skip to content

[Bug]: Cannot Update Items metadata in draft order #14481

@fxmb

Description

@fxmb

Package.json file

Latest Medusa

Node.js version

20

Database and its version

18

Operating system name and version

Linux

Browser name

No response

What happended?

For some reason I cannot update the metadata of an item in a draft order:

The workflow updateDraftOrderItemWorkflow doesnt seem to work for metadata updates?

   const { result } = await updateDraftOrderItemWorkflow(req.scope).run({
      input: {
        order_id,
        items: [
          {
            id: item_id,
            quantity,
            metadata: {"test": "abc"}
          },
        ],
      },
    });

This returns 200 but it doesnt actually update the items metadata?

We need to add metadata in the draft order from the admin UI but I cannot get this to work? I think the endpoint does not accept metadata for some reasons?!

Expected behavior

Adds metadata

Actual behavior

Doesnt add metadata

Link to reproduction repo

n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions