Coflyr · Current header review

WorkorderMaster: parent and child work headers

Model index · Unified field inventory

The parent/child WorkorderMaster decision supersedes the former three-table split. HTML only; backend and database adoption pending complete review.

Reviewed · Model review completed 2026-10-10. Backend/database implementation and adoption remain pending.

Model decisions

Current backend classReview decisionReplacement
WorkpackageOrderRename and consolidateWorkorderMaster; one persisted header table
WorkpackageMasterDeprecatedParent WorkorderMaster rows
WorkorderMaster (legacy)DeprecatedChild rows in unified WorkorderMaster

Ownership

WorkorderMaster parent → WorkorderMaster children → WorkStep

Use ParentWorkorderId as a self-reference. Define an explicit parent/executable role so an empty package parent remains identifiable. Preserve aircraft/component context and validate hierarchy compatibility, self-links and cycles. The former WorkpackageId membership maps to ParentWorkorderId. Existing parent links and historical groups must be reconciled before replacing that membership.

Former package planning, collection, sequence checks, handover, closure and certified release remain parent operations. Child work completion remains executable work. Closing a parent must verify child completion/disposition, reported maintenance events, outstanding paperwork and release prerequisites. Shared field definitions do not mean that parent and child rows share values.

Retained field decisions

Use IssueMethod, Classification, SerialNumber, ApprovalNo and PlannedEndDate once in the unified model. WorkStatus moves to WorkStep; WorkApprovalStatus is Dropped for later review. PlannedEndDate remains nullable in storage with required-date validation for executable orders. HumanStaffId is marked Dropped; the earlier issuer-name/staff merge is superseded. PartId replaces ComponentPartNumber; WorkorderRoutineCheckType remains Dropped. ComplyWithMaintenanceTaskId is a nullable MaintenanceTask lookup selected through a searchable TaskCode / TaskTitle dropdown; it replaces the three InitialDue fields, which are marked Dropped. Due-limit resolution and completion compliance processing remain pending implementation. WorkpackageDescription, WorkpackageNumber and WorkpackageType are Dropped. WorkpackageTitle is renamed WorkorderTitle; UnknownAircraft becomes required String. Keep the exact reviewed AccessGroupDemartment spelling pending further review. ConfigurationMasterId and ConfigurationId are nullable UUID lookups replacing free-text AircraftPosition; the selected functional position must belong to the selected configuration master. Remaining fields and distinct legacy business-number/type fields continue in the inventory for review.

Backend and database adoption after review

  1. Rename the common class/table to WorkorderMaster and merge both concrete-header field sets, applying approved renames and conversions. Replace the earlier TPT header split with one persisted model.
  2. Inspect live schemas and collisions among package/order/group IDs and business numbers. Preserve identity where possible and map every incoming reference, audit identity and revision before retiring source rows.
  3. Backfill parent rows from packages and child rows from orders. Reconcile WorkpackageId and existing ParentWorkorderId links, ownership and explicit role values; prevent cycles.
  4. Retarget package/order controllers, services, lookups, frontend routes, production plans/runs, events, findings, damage, resources, bookings and release workflows to the appropriate parent or child WorkorderMaster.
  5. Validate hierarchy queries, creation and lifecycle transitions, authorization, number allocation, serial/asset lookup semantics, historical data and reference completeness before applying a reviewed migration.

No backend model rename, migration or physical table drop has been performed by this HTML review update. Package extension tables are not automatically retired by the header decision.