Cloud Migration bug fixes (BC14 reimplementation, custom mapping, OnPrem dev companies)#9200
Conversation
Copilot PR ReviewIteration 2 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 1 knowledge-backed · 0 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Changing PageType from List to Card is a breaking change for an existing published page. The layout uses only groups/fields (no repeater) so it renders correctly as a List page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Show Started as neutral bold instead of red; derive In Progress in the display layer while a company is actively running a phase. - Add Show Errors action opening the Error Overview filtered to the selected company (SetCompanyFilter). - Add Continue Migration action, enabled only when the company status is Failed. - Error Overview: scope per-company loading via HybridCompany.SetRange instead of a per-record skip. Related: ADO 642621, PR #9200
DataTransfer.CopyRows() only works inside platform upgrade/install codeunits, but this migration always runs as a background task/session. The IsIntelligentCloudEnabled() fast path therefore always threw 'DataTransfer is only usable during upgrade or install', so historical G/L and Posted Sales Invoice errors could never be resolved by continuing/rerunning from any entry point. Always use the per-record batched copy; the OnConfigure* override hooks still allow an upgrade-context caller to opt into DataTransfer. Also clarify the Continue migration tooltip to explain that rerunning is what resolves errors.
…g migration The Cloud Migration Management top Status field renders the Summary Details blob. Writing a per-company failure into Details from MarkUpgradeFailed made the overall status read as failed while other companies were still migrating. Details is now written only when the whole run finalizes as UpgradeFailed (SetSummaryFailed / EvaluateAndSetFinalSummaryStatus), so the headline stays 'Upgrade in Progress' until then. Per-company error details remain on the Hybrid Company Status row and the BC14 Migration Errors page.
… rename to RestartHistoricalDispatch
|
RestartHistoricalDispatch (BC14CompanyMigrationInfo.table.al) resets the Historical* bookkeeping fields for a rerun but never resets "Current Migration Step" to Historical, while BC14MigrationRunner.RerunHistoricalForCompany flips the company's overall Upgrade Status back to Started via AcquireRerunSlot. On the BC14 Company Upgrade Status page, IsActivelyMigrating(MigrationStep) treats any step other than NotStarted/Completed as active, but since Current Migration Step is left at Completed (its value from the prior successful main migration), the page falls into the 'else' branch and displays the raw 'Started' status with StatusStyle 'Standard' instead of the new 'In Progress' label with StatusStyle 'Strong' that this same PR introduces for actively-migrating companies. This is exactly the scenario the new IsActivelyMigrating feature was built to cover, so an administrator watching the status page during a historical-only rerun sees a company that looks stalled/reverted rather than actively working. Recommend setting Current Migration Step to Historical (or an equivalent 'rerunning' marker) inside RestartHistoricalDispatch, or adding a dedicated bookkeeping flag that IsActivelyMigrating/the page can key off of. This impact would normally warrant a higher severity, but per BCQuality's agent-finding rules severity is capped at minor without a backing knowledge-file citation; treat it as worth promoting to a real defect ticket. Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.12.4 |
Summary
Bug fixes for the Business Central cloud reimplementation / migration tooling (BC14 reimplementation, HybridBaseDeployment custom-migration mapping, and cloud migration management pages).
Fixes AB#641643
Main changes
BC14 reimplementation wizard
BC14MigrationProvider.ShowConfigureMigrationTablesMappingStep()now returnsfalse(matching the interface default), so the wizard no longer shows the custom migration-table mapping step.BC14MigrationOrchestrator.TriggerUpgradeIfOneStepEnablednow exits early (with telemetry) when no data was replicated for the run, mirroring the "no data replicated" check used by the GP migration. This prevents an upgrade error being thrown during setup when no companies have been selected/replicated yet.Custom migration table mapping page (page 40016 "Add Custom Migration Mapping")
Cloud migration management pages (OnPrem development)
Cloud Migration Management(page 40063) andIntelligent Cloud Management(page 4003). It inserts the environment's existing companies into theHybrid Companytable (idempotently) so they appear in the cloud migration wizard during OnPrem development.Tests
BC14MigrationFlowTeststo assert the mapping-config step is skipped and added a flow test covering the "no data replicated" one-step upgrade guard.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
AB#642621