Nicolas Gorga 3e2991e447 fix(core-flows): create reservations on draft order conversion to regular order (#14010)
## Summary

**What** — What changes are introduced in this PR?

Avoid creating reservations when draft order edits are confirmed and rather, create them when the draft order is converted into a regular order.

**Why** — Why are these changes relevant or necessary?  

While the order is a draft, creating reservations would potentially block inventory for regular order requests, when the draft represents a non materialized state of a purchase that might never be completed or at a latter point in time.

**How** — How have these changes been implemented?

Removed the reservation creations inside of `confirmDraftOrderEditWorkflow` and instead do it inside `convertDraftOrderWorkflow`

**Testing** — How have these changes been tested, or how can the reviewer test the feature?

Added integration tests.

---

## 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.

```ts
// Example usage
```

---

## Checklist

Please ensure the following before requesting a review:

- [x] I have added a **changeset** for this PR
    - Every non-breaking change should be marked as a **patch**
    - To add a changeset, run `yarn changeset` and follow the prompts
- [x] The changes are covered by relevant **tests**
- [x] I have verified the code works as intended locally
- [x] I have linked the related issue(s) if applicable

---

## Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.

fixes #13773 
closes SUP-2523
2025-12-01 12:08:03 +00:00
2025-08-05 13:21:52 +02:00
2025-09-26 14:43:49 +02:00

Medusa logo

Medusa

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. PRs welcome!

Follow @medusajs Discord Chat

Getting Started

Visit the Documentation to set up a Medusa application.

About Medusa

Medusa is a commerce platform with a built-in framework for customization that allows you to build custom commerce applications without reinventing core commerce logic. The framework and modules can be used to support advanced B2B or DTC commerce stores, marketplaces, distributor platforms, PoS systems, service businesses, or similar solutions that need foundational commerce primitives. All commerce modules are open-source and freely available on npm.

Learn more about Medusas architecture and commerce modules in the Docs.

Upgrades & Integrations

Follow the Release Notes to keep your Medusa project up-to-date.

Check out all available Medusa integrations.

Community & Contributions

The core team is available in GitHub Discussions, where you can create issues, share ideas, and discuss roadmap.

Our Contribution Guide describes how to contribute to the codebase and Docs.

Join our Discord server to meet and discuss with more than 14,000 other community members.

Other channels

License

Licensed under the MIT License.

Description
No description provided
Readme 539 MiB
Languages
TypeScript 84.9%
JavaScript 14.8%
Shell 0.2%