-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Summary
In Vendure 3.5.1, the “Use global out-of-stock threshold” checkbox in the Admin UI does not persist correctly after saving, and the local outOfStockThreshold field appears to have no effect even when explicitly set.
Steps to Reproduce
Go to Admin UI → Product Variants → Edit Variant.
Check “Use global out-of-stock threshold” and click Update.
Refresh the page or revisit the variant.
Observe that the checkbox is visually reset to unchecked.
Try setting a local outOfStockThreshold value (e.g. 100) and save.
Observe that the variant still behaves as if the threshold is not applied.
Expected Behavior
The checkbox should remain checked after saving and reflect the actual backend value.
The local outOfStockThreshold should override the global threshold when useGlobalOutOfStockThreshold = false.
Actual Behavior
The checkbox resets visually after save/refresh, even though the global threshold is applied.
The local threshold has no effect, even when trackInventory = true and useGlobalOutOfStockThreshold = false.
Verified via Admin API
graphql
query {
productVariant(id: "variantId") {
trackInventory
stockOnHand
outOfStockThreshold
useGlobalOutOfStockThreshold
}
}
useGlobalOutOfStockThreshold = true is returned correctly.
But the Admin UI does not reflect this state.
Setting outOfStockThreshold manually does not change behavior.
Environment
Vendure version: 3.5.1
Channel: Default
User role: Super Admin
Browser: Chrome (latest)
Screenshots
I can provide screenshots of the Admin UI before and after saving if needed.
Suggested Fix
Ensure the checkbox state is bound to useGlobalOutOfStockThreshold correctly.
Validate that outOfStockThreshold is respected when useGlobalOutOfStockThreshold = false.