Order List API Applies Only the First of Multiple Status Filters
Level 2 · node · API · Multi-value status query parameter partially ignored
Scenario
A fictional equipment-order dashboard requests orders in both ready and packing states using a query such as status=ready,packing. The API contract supports comma-separated states, but the implementation returns only orders matching the first state. A single-state query works.
Requirements
Parse all comma-separated states and return orders matching any specified state. Trim whitespace around values. An empty filter should return all orders, and repeated states must not duplicate orders.
Acceptance criteria
- A single state returns only orders in that state.
- Multiple states return orders in every requested state.
- Whitespace around states is ignored.
- An empty status filter returns all orders.