feat(migrations): auto-select matching destination project in the wizard #176
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/smart-destination-matching"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Discovery now attaches a server-computed suggested_destination to every
item: a verified prior binding (bound migration_source_issues rows or an
earlier run's destination for the same source_ref + source_base_url)
wins outright, otherwise exactly one normalized-name match in the
organization pre-selects the existing project, several matches require
an explicit choice with per-candidate eligibility reasons, and none
proposes a new project. Archived and foreign-org projects never match;
a Jira destination stays eligible when only its docs provisioning
failed (kind-specific readiness mirrors destinationUsable).
The wizard seeds each destination from the suggestion: detected
existing projects get an explicit affordance, choose-mode lists the
candidates with ineligible reasons instead of dropping them, and
create-mode warns that a matching project exists so a distinct identity
is required. Operator overrides are tracked per item and never
reseeded; store()/destinationPlans() still validates the submitted
choice.
Normalization (NFKD fold, diacritic strip, lowercase, whitespace
collapse) is shared via normalizeForMatch — identifiers.ts twinning
App\Support\Identifiers.