mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 11:53:12 +00:00
The manual POC "follow the site" clear-rule compared the edit against every live Site contact. A work order only ever displays one of them, so editing to a different live contact (Site has Alice primary and Bob; WO shows Alice; edit to Bob) matched, cleared the override, and left the row showing Alice with no audit row written — the SH-379 symptom on a different input. A work order with a linked WorkOrderContacts POC hit the same bug when the dispatcher typed the Site's primary: the override cleared and the linked contact showed instead. Compare the edit against the single contact the work order actually follows — the linked WorkOrderContacts POC, or else the Site primary (ResolvePrimary) — matching the board projection's override -> linked -> site precedence, and store the override whenever the edit differs from it. The create path in WorkOrderBoardCreateService had the same any-contact rule and gets the same fix; a supplied PocContactId that is not a live Site contact leaves no follow target, so the typed POC is stored. Replaces MatchesAnySiteContact with Matches(name, phone, contact); comment and PR-body wording updated to state the followed-contact rule. Adds tests for the second-site-contact edit, the linked-contact-differs edit, and the second-site-contact create case. |
||
|---|---|---|
| .. | ||
| DashboardBusinessTime.cs | ||
| DashboardMetrics.cs | ||
| DashboardRegions.cs | ||
| LifecycleStatusMapper.cs | ||
| LifecycleStatusSets.cs | ||
| SeaHavenClaimTypes.cs | ||
| UserMutationErrors.cs | ||
| UsStateCodes.cs | ||
| VendorPhoneNormalizer.cs | ||
| WorkOrderAdditionalContactsMapper.cs | ||
| WorkOrderAddonCutoff.cs | ||
| WorkOrderAuditProjection.cs | ||
| WorkOrderBoardApptTimeParser.cs | ||
| WorkOrderBoardCreateLifecycleRules.cs | ||
| WorkOrderBoardFieldMutations.cs | ||
| WorkOrderBoardFieldNames.cs | ||
| WorkOrderBoardMutationRules.cs | ||
| WorkOrderBoardPatchLifecycleRules.cs | ||
| WorkOrderBoardSortFields.cs | ||
| WorkOrderCommentProjection.cs | ||
| WorkOrderCompletionDocFileRules.cs | ||
| WorkOrderCompletionSnapshotMapper.cs | ||
| WorkOrderDerivedFields.cs | ||
| WorkOrderExternalVersion.cs | ||
| WorkOrderFlagColors.cs | ||
| WorkOrderIngestFieldMapper.cs | ||
| WorkOrderMediaAuthorization.cs | ||
| WorkOrderMediaFileRules.cs | ||
| WorkOrderMediaProjection.cs | ||
| WorkOrderNumberNormalizer.cs | ||
| WorkOrderNumberRules.cs | ||
| WorkOrderOperationalWeek.cs | ||
| WorkOrderPocSiteContact.cs | ||
| WorkOrderSearchDateRangeResolver.cs | ||
| WorkOrderSeverityRules.cs | ||
| WorkOrderTypeMapper.cs | ||
| WorkOrderUpliftAllowance.cs | ||
| WorkOrderUpliftContractMapper.cs | ||