Admin order detail view displays full lifecycle history
Why it matters
An admin detail view that shows only the current order status gives a misleading picture: the order is 'shipped', but was it ever in 'confirmed'? Was it cancelled and re-opened? Did the admin manually override a status? Without the full history timeline, admins cannot diagnose processing anomalies, verify that the correct notifications fired at each step, or respond to customer complaints about 'the order status changed without warning.' CWE-778 and GDPR Art. 5(1)(f) both require that the audit trail is accessible, not just stored — data in a table that no UI surfaces is operationally equivalent to data that was never captured.
Severity rationale
Medium because order history data may exist in the database but is worthless if not surfaced in the admin UI, turning every dispute into a manual SQL query.
Remediation
Add an order timeline section to the admin order detail page at app/admin/orders/[id]/page.tsx by including the history relation in the Prisma query.
// app/admin/orders/[id]/page.tsx
const order = await db.orders.findUnique({
where: { id: params.id },
include: {
items: true,
user: true,
history: { orderBy: { createdAt: 'asc' } },
},
})
// Render:
<ol>
{order.history.map((entry) => (
<li key={entry.id}>
<time>{entry.createdAt.toLocaleString()}</time>
<span>{entry.fromStatus ? `${entry.fromStatus} → ${entry.toStatus}` : entry.toStatus}</span>
{entry.note && <p>{entry.note}</p>}
{entry.actorId && <span>by {entry.actorId}</span>}
</li>
))}
</ol>
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Order Management Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-778 — Insufficient Logging
- iso-25010:2011 · operability — Operability — admin usability
- gdpr · Art. 5(1)(f) — Integrity and confidentiality — auditability of personal data processing
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ecommerce-order-management·automated