Purchasing Workbench — Rush Priority Addendum (superseded)
PC — /po/workbench
Purchasing Workbench — Rush Priority Addendum (SUPERSEDED)
Superseded 2026-09-06. Everything in this addendum has been folded into docs/tech/po_workbench.md (P2) — see its "Rush priority, age and default sort" section. This file is kept only so existing links do not break; edit the po_workbench spec, not this one.Original note (Ver 1, 2026-09-05): this covered only what the Rush RO build added, because the po_workbench spec was not in that handoff. It has now been folded in.
What was added
- Priority column and Age column on the grid (
po.py,build_workbench_rows()/_aggregate_demand()). A row's priority is the highest priority among every RO contributing demand to it (Rbeats1-5beats blank) — an INV row can aggregate several ROs by SKU, so this is a per-row maximum, not a per-RO value. Age is how long the oldest still-open Rush RO behind that row has been waiting, formatted asXm/Xh Ym/Xd Yh. - Select-by-priority filter (
priorityquerystring param) plus a Rush only chip shortcut — both compose with every existing filter the same way Below Min / Include 0 to order already do. - Default sort: Rush rows (priority
R) sort first, oldest-waiting first; everything else keeps the prior SKU/description order. An explicit column sort (SKU/Vendor/Delivery) still fully overrides this on click, same as before. - Demand drill-down (
/po/workbench/{sku}/demand, shared by the grid's inline expansion and the full SKU detail page) now includes each contributing RO'spriority_code, and — for an admin or level1 viewer — a Set Rush / Clear Rush button per row. POST /ro/{order_no}/priority(new, inro.py): the only way to changepriority_codefrom the Workbench. Writes exactly'R'orNULL, never any other value, and only foradmin/level1(require_action(user, "rush_priority_set")) — enforced server-side regardless of what the UI shows.
What was explicitly NOT touched
Per the Rush RO Ver 1 brief: calc_rec_qty(), the buy-list save flow (POST /workbench/save), the CC (cycle-count) logic, and buy_list_display_status(). notify.notify_release() (texting the requester when a Rush RO is actually ordered) is written and ready but has no live call site — see its own docstring in app/notify.py for why (there is no real "PO released" event in this build to hook into yet).