Skip to content

WO · Work orders and maintenance

A return opens a work order, the hub until the car is ready again. It is routed to insurance, maintenance, a pool repair or straight to preparation. Every hand-off is a work_order_events row. Code WO.

These questions are open in #84. Each gets a rule with a new ID once it is answered.

  • WO open 1 · Scoping maintenance records

R-WO-01 · A car has at most one open work order

Section titled “R-WO-01 · A car has at most one open work order”
  • Status: planned
  • Example: given a car with a work order still routed to maintenance, when a second work order is opened for it, then it is refused.
  • Refusal: none: unique_violation (23505), from work_orders_one_open_per_vehicle.
  • Who: every writer.
  • Source: [Ref] Data model V13: work_orders.

R-WO-02 · A ready work order records when it became ready

Section titled “R-WO-02 · A ready work order records when it became ready”
  • Status: planned
  • Example: given a work order, when its status is set to ready with no ready_at, then it is refused.
  • Refusal: none: check_violation (23514).
  • Who: every writer.
  • Source: [Ref] Data model V13: work_orders.

R-WO-03 · Reading work orders and maintenance records needs work_order:read at their pool

Section titled “R-WO-03 · Reading work orders and maintenance records needs work_order:read at their pool”
  • Status: planned
  • Example: given a checker at PML, when he reads work_orders, then nothing comes back; a maintenance user at PML sees them.
  • Refusal: none: hidden.
  • Who: super_admin, admin, admin_fleet, maintenance, asuransi and viewer hold work_order:read.
  • Source: [Ref] Roles, policy matrix.

R-WO-04 · Adding or changing a work order or a maintenance record needs maintenance:write at its pool

Section titled “R-WO-04 · Adding or changing a work order or a maintenance record needs maintenance:write at its pool”
  • Status: planned
  • Example: given an asuransi user at PML, when she routes a work order, then nothing changes; a maintenance user at PML may.
  • Refusal: none: insufficient_privilege (42501) on insert; no effect on update.
  • Who: super_admin, admin, admin_fleet and maintenance hold maintenance:write.
  • Source: [Ref] Roles, policy matrix.