mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-01 18:03:13 +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. |
||
|---|---|---|
| .. | ||
| Fixtures | ||
| ConcurrencyExceptionFilterTests.cs | ||
| LifecycleStatusMapperTests.cs | ||
| Phase4SearchIndexesSqlServerTests.cs | ||
| SeaHavenIndustries.Tests.csproj | ||
| SH138SiteContactsSqlServerTests.cs | ||
| SH221LocationAccountScopeSqlServerTests.cs | ||
| SH249TradesVocabularyMigrationTests.cs | ||
| SH303ServicesRegistryMigrationTests.cs | ||
| ShocWebhookVectorTests.cs | ||
| SyncFieldMergePolicyTests.cs | ||
| TestFileStoragePort.cs | ||
| UpliftQueueReadRelationalTests.cs | ||
| WorkOrderAccountScopeTests.cs | ||
| WorkOrderAccountTestHelpers.cs | ||
| WorkOrderAddonCutoffTests.cs | ||
| WorkOrderAuditServiceTests.cs | ||
| WorkOrderBoardCancelServiceTests.cs | ||
| WorkOrderBoardConcurrencyTests.cs | ||
| WorkOrderBoardCreateRelationalTests.cs | ||
| WorkOrderBoardCreateServiceTests.cs | ||
| WorkOrderBoardCreateSyncLockTests.cs | ||
| WorkOrderBoardDispatchAssignmentTests.cs | ||
| WorkOrderBoardFieldMutationsTests.cs | ||
| WorkOrderBoardInactiveVendorTests.cs | ||
| WorkOrderBoardMutationRulesTests.cs | ||
| WorkOrderBoardPatchLifecycleRulesTests.cs | ||
| WorkOrderBoardSearchTests.cs | ||
| WorkOrderBoardServiceTests.cs | ||
| WorkOrderBoardUpdateServiceTests.cs | ||
| WorkOrderCompletedSelectiveLockTests.cs | ||
| WorkOrderCompletionFreezeTests.cs | ||
| WorkOrderDerivedFieldsTests.cs | ||
| WorkOrderFieldLockServiceTests.cs | ||
| WorkOrderMediaConcurrencyRelationalTests.cs | ||
| WorkOrderMigrationDiscoveryTests.cs | ||
| WorkOrderNumberNormalizerTests.cs | ||
| WorkOrderPhase6Tests.cs | ||
| WorkOrderPhase7CoexistenceTests.cs | ||
| WorkOrderPocServiceTests.cs | ||
| WorkOrderReconciliationAuthTests.cs | ||
| WorkOrderReconciliationTests.cs | ||
| WorkOrderTypeMapperTests.cs | ||
| WorkOrderUpliftServiceTests.cs | ||
| WorkOrderWebhookTests.cs | ||
| WorkOrderWeekRolledTests.cs | ||