Skip to content

fix(shipment): rename status purchased→created, remove choices constraint, enrich tracker event#998

Open
danh91 wants to merge 2 commits intomainfrom
fix/shipment-status-purchased-to-created
Open

fix(shipment): rename status purchased→created, remove choices constraint, enrich tracker event#998
danh91 wants to merge 2 commits intomainfrom
fix/shipment-status-purchased-to-created

Conversation

@danh91
Copy link
Member

@danh91 danh91 commented Mar 4, 2026

Changes

1. Rename purchasedcreated status

The shipment status purchased is renamed to created to better reflect semantics — a label being created is not the same as a purchase. All Python, CLI, and test references updated.

2. Shipment.status: plain CharField (no choices constraint)

Removes choices=SHIPMENT_STATUS from Shipment.status. Future statuses need no Django migrations. Data migration runs RunPython to update existing purchased rows to created before the field alteration.

3. Tracker created event — full timestamp fields

The synthetic 'created' event injected when a shipment tracker is first created now includes:

  • date: YYYY-MM-DD
  • time: HH:MM AM/PM (consistent with carrier parsers)
  • timestamp: ISO 8601 UTC
  • status: 'created', code: 'CREATED', description: 'Shipment label created'

4. Pricing signal fix

Removed 'created' from the fee-capture exclusion list — fees should be captured when a shipment reaches created status (label purchased), not suppressed.

Tests

All server tests pass (410+ tests across core, proxy, manager, events, graph, orders, documents, admin, pricing).

@vercel
Copy link

vercel bot commented Mar 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
karrio-web Ready Ready Preview, Comment Mar 4, 2026 5:26pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant