Swapping crews mid-project

Reassigning a project ends the current assignment with a required reason and opens a new pending one, leaving the full chain readable afterwards.

What it is

SwapAssignment ends the live assignment (status ended, ended_at, ended_reason) and creates a new pending assignment for the incoming crew. A unique partial index guarantees only one pending or active assignment exists per project at a time.

Also called: reassign the crew · took the crew off the job · crew handoff · assignment history

See it
Swapping crews mid-project
CustomerBuildingAmountStatus
Ivy Brubaker40×64 Shop$6,710Open
Gideon AltHobby Shop$16,970Paid
Ivy BrubakerRiding Arena$7,280Sent
Ronan PetschEquipment Storage$11,650Open
Ivy Brubaker40×64 Shop$16,210Approved
An assignment history list on a project: crew A ended with a reason, crew B pending, crew B active with its signature. Sample data — no customer information appears here.
How it works
  1. 1getCurrentAssignment finds the single pending-or-active row.
  2. 2The old row is closed with a mandatory reason before the new one is created.
  3. 3getAssignmentHistory returns the whole chain newest first.
  4. 4The incoming crew lead must sign the same agreement, as clause 5 of the default agreement requires.
Why we built it

Taking a job off one crew and handing it to another used to erase the fact that the first crew had ever held it, along with the agreement they signed. A swap ends the outgoing assignment and opens a new one for the incoming crew, whose lead must sign the same agreement before taking over, and a job can only ever have one crew on the hook at a time. The old assignment stays on the record with its signature intact, so the history of who held the job and when reads back in order.

The problem
  • Reassignments overwriting the previous record.
  • Two crews simultaneously assigned to one project.
  • Handoffs with no signed acceptance from the incoming crew.
Sound familiar?
What you get
The reason a crew came off a job is on the record.
Only one crew can own a job at a time, enforced in the database.
The incoming lead accepts the same terms.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →