EARS: When the airline applies a group of changes to an order, the system shall raise the order's version by one and record the group in the order's history.
Story: As a seller, I want each version of an order to stand for one set of changes, so that I can rebuild any version from the order's history.
Acceptance criteria:
-
ONE-404.1: When an order is created, the system shall give it version 1 and a history with no change groups.
-
ONE-404.2: When the airline applies a group of changes to an order, the system shall apply the group to the order and raise its version by one.
-
ONE-404.3: The system shall keep an order's version one more than the number of change groups applied since it was created.
-
ONE-404.4: When a seller asks for an order's history, the system shall return the order at version 1 and each later change group once, labelled with the version it produced.
-
ONE-404.5: When a seller applies the change groups of an order's history to the order at version 1 in the order listed, the system shall give the order as it is now.
The history is listed oldest first or newest first, as the reading of the
sources says (HistoryListing, orderHistory).