You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please stick to the template and provide as much detail as possible to help us diagnose and fix the issue.
Low effort bug reports will be closed.
Describe the bug
On self-hosted hi.events, if one active product capacity assignment goes negative (often due to RESERVED holds), checkout can fail with Sorry, these products are sold out for other products that are still available.
To Reproduce
Steps to reproduce the behavior:
Create event with multiple products and multiple active capacity assignments.
Ensure one capacity assignment becomes overrun (e.g. used_capacity plus reserved math causes effective negative available).
Keep another product available and selectable (e.g. promo-code product).
Submit checkout for the available product only.
Observe 422 + sold-out message despite available selected product.
Expected behavior
Capacity validation should only block checkout when selected products violate their own capacity constraints.
An unrelated over-reserved capacity bucket should not block checkout for products not in that bucket.
Hi.Events Version and platform
Docker
Actual behavior
Event page shows VIP product available (is_available=true, is_sold_out=false).
Clicking Continue with VIP selected returns 422 on:
POST /api/public/events/{eventId}/order
User sees toast:
Sorry, these products are sold out
Evidence
Public event API still marks VIP available.
Checkout request fails at order creation with 422.
DB state (example):
capacity assignment A (unrelated): effective availability > 0
capacity assignment B (different product): effective availability < 0
Validation path appears to fail globally when any assignment evaluates negative.
Suspected code area
app/Services/Domain/Order/OrderCreateRequestValidationService.php
Method: validateOverallCapacity()
If RHS is negative, 0 > -N becomes true for capacities with no selected products, causing global sold-out rejection.
Suggested fix direction
Skip capacity checks when selected quantity for that capacity is 0.
Prevent double-counting reserved quantities if available capacity already reflects reservation state.
Add regression tests for:
unrelated negative capacity bucket does not block selected product
waitlist/reserved interaction with multiple capacity assignments
Note
Please stick to the template and provide as much detail as possible to help us diagnose and fix the issue.
Low effort bug reports will be closed.
Describe the bug
On self-hosted hi.events, if one active product capacity assignment goes negative (often due to RESERVED holds), checkout can fail with Sorry, these products are sold out for other products that are still available.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Capacity validation should only block checkout when selected products violate their own capacity constraints.
An unrelated over-reserved capacity bucket should not block checkout for products not in that bucket.
Hi.Events Version and platform
Docker
Actual behavior
Evidence
Suspected code area
app/Services/Domain/Order/OrderCreateRequestValidationService.php
Method: validateOverallCapacity()
It currently loops all capacities and compares:
If RHS is negative, 0 > -N becomes true for capacities with no selected products, causing global sold-out rejection.
Suggested fix direction
Skip capacity checks when selected quantity for that capacity is 0.
Prevent double-counting reserved quantities if available capacity already reflects reservation state.
Add regression tests for:
unrelated negative capacity bucket does not block selected product
waitlist/reserved interaction with multiple capacity assignments