Skip to content

Cloud Migration bug fixes (BC14 reimplementation, custom mapping, OnPrem dev companies)#9200

Merged
gggdttt merged 8 commits into
mainfrom
bugs/CloudMigrationBugfixes-July
Jul 23, 2026
Merged

Cloud Migration bug fixes (BC14 reimplementation, custom mapping, OnPrem dev companies)#9200
gggdttt merged 8 commits into
mainfrom
bugs/CloudMigrationBugfixes-July

Conversation

@nikolakukrika

@nikolakukrika nikolakukrika commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

  • Skip the mapping-tables configuration step in the setup wizard after selecting the company type. BC14MigrationProvider.ShowConfigureMigrationTablesMappingStep() now returns false (matching the interface default), so the wizard no longer shows the custom migration-table mapping step.
  • Guard the one-step data upgrade against setup/empty runs. BC14MigrationOrchestrator.TriggerUpgradeIfOneStepEnabled now 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")

  • The mapping page can always be closed. Reworked page/close behavior so an invalid mapping no longer blocks closing the page; the target table is validated before the mapping is saved, and the page opens via lookup mode. Converted the page to a Card layout for the single-mapping editing experience.

Cloud migration management pages (OnPrem development)

  • New action "OnPrem Development - Insert existing companies as Hybrid Companies" added next to the Enable/Disable OnPrem Development action on both Cloud Migration Management (page 40063) and Intelligent Cloud Management (page 4003). It inserts the environment's existing companies into the Hybrid Company table (idempotently) so they appear in the cloud migration wizard during OnPrem development.

Tests

  • Updated BC14MigrationFlowTests to 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

@nikolakukrika
nikolakukrika requested a review from a team July 7, 2026 21:32
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 7, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 2 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Findings by domain

Findings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).

Domain Findings Knowledge-backed Agent Inline Fallback
Style 1 1 0 0 0

Totals: 1 knowledge-backed · 0 agent findings.

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

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>
gggdttt
gggdttt previously approved these changes Jul 10, 2026
@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Jul 16, 2026
- 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.
@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Agent}$

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

Comment thread src/Apps/W1/HybridBC14/app/src/Orchestration/BC14CompanyMigrationInfo.table.al Outdated
@gggdttt
gggdttt enabled auto-merge July 22, 2026 07:26
@gggdttt
gggdttt disabled auto-merge July 23, 2026 07:40
@gggdttt
gggdttt added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 7a0bc83 Jul 23, 2026
326 of 330 checks passed
@gggdttt
gggdttt deleted the bugs/CloudMigrationBugfixes-July branch July 23, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants