v2.13.1
medusajs/medusav2.13.1Jan 25, 2026by olivermrbl
AI Summary
This release fixes a bug introduced in v2.13.0 where critical order item fields like quantity were being dropped during field mapping, preventing order totals from being calculated correctly when using the select-in strategy.
Key Highlights
- Fixes regression with totals on order listing
- Fixes item relation loading in select-in path
- Fixes batch translation settings request type
- Fixes recompute adjustments for draft orders after changes
Full Release Notes
<!--  # v2.13.1: Fixes regression with totals on order listing This release fixes a bug introduced in v2.13.0 around total fields selection when listing orders. CMS_BREAK --> ## Highlights ### Fixes regression with totals on order listing This release fixes a bug introduced in v2.13.0 around total fields selection when listing orders. The bug occurs when loading order items with their relations using the `select-in` strategy: 1. The code maps field selections from `items.*` to `items.item.*` to load OrderLineItem data 2. However, critical OrderItem fields like `quantity` live on items.detail, not on items.item 3. These fields were being dropped during the mapping process 4. Without quantity data, the order totals couldn't be calculated correctly The `select-in` strategy is used when listing orders with pagination options, which is for example used in the `GET /admin/orders` and `GET /admin/draft-orders` endpoints. This fix adds compensatory logic that ensures when `items.item.*` fields are selected, the corresponding `items.*` fields are also selected or preserved. This prevents the data required for order calculations from being removed. ## Bugs * fix(medusa): use http type for batch translation settings request by @shahednasser in https://github.com/medusajs/medusa/pull/14612 * fix(core-flows): recompute adjustments for draft orders after changes are added by @fPolic in https://github.com/medusajs/medusa/pull/14511 * fix(order): item relation loading in select-in path by @fPolic in https://github.com/medusajs/medusa/pull/14629 ## Documentation * docs: changes for v2.13.0 by @shahednasser in https://github.com/medusajs/medusa/pull/14524 * chore(docs): Updated API Reference (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14609 * docs: fix references pipeline + generate references for v2.13.0 by @shahednasser in https://github.com/medusajs/medusa/pull/14623 ## Chores * chore(docs): Updated UI Reference (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14608 * chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14607 * chore(docs): Update version in documentation (automated) by @github-actions[bot] in https://github.com/medusajs/medusa/pull/14611 * chore(medusa): default medusa policies by @carlos-r-l-rodrigues in https://github.com/medusajs/medusa/pull/14542 **Full Changelog**: https://github.com/medusajs/medusa/compare/v2.13.0...v2.13.1