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:
- The code maps field selections from
items.*toitems.item.*to load OrderLineItem data - However, critical OrderItem fields like
quantitylive on items.detail, not on items.item - These fields were being dropped during the mapping process
- 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 #14612
- fix(core-flows): recompute adjustments for draft orders after changes are added by @fPolic in #14511
- fix(order): item relation loading in select-in path by @fPolic in #14629
Documentation
- docs: changes for v2.13.0 by @shahednasser in #14524
- chore(docs): Updated API Reference (automated) by @github-actions[bot] in #14609
- docs: fix references pipeline + generate references for v2.13.0 by @shahednasser in #14623
Chores
- chore(docs): Updated UI Reference (automated) by @github-actions[bot] in #14608
- chore(docs): Generated DML JSON files (automated) by @github-actions[bot] in #14607
- chore(docs): Update version in documentation (automated) by @github-actions[bot] in #14611
- chore(medusa): default medusa policies by @carlos-r-l-rodrigues in #14542
Full Changelog: v2.13.0...v2.13.1