EARS: The system shall mark an order opened while any of its services holds value, and closed once all its items are closed or cancelled and all its services are delivered or removed.
Story: As an airline, I want an order's status worked out from its items and services, so that an order is closed only when nothing in it holds value.
Acceptance criteria:
-
ONE-003.1: While at least one service of an order holds value, the system shall mark the order opened.
-
ONE-003.2: When every item of an order is closed or cancelled and every service is delivered or removed, the system shall mark the order closed.
-
ONE-003.3: The system shall never mark an order both opened and closed.
-
ONE-003.4: The system shall give every order that has a service either the status opened or the status closed.
The result lists every status whose condition holds.