Transport import: remaining ordinal name lookups vs case-insensitive SQL; GetTemplatesWithChildrenAsync matches derived rows #95

Closed
opened 2026-11-09 13:54:28 -05:00 by dohertj2 · 1 comment
Owner

Residuals from #93 (transport import name matching vs SQL Server case-insensitive collation):

  • Preview's shared-script, external-system, SMTP, SMS and folder lookups — and the apply-side by-name lookups — still use ordinal comparers while SQL matches case-insensitively, so a differently-cased target can be reported as New and then collide on apply.
  • GetTemplatesWithChildrenAsync does not filter IsDerived, so a bundle name can match derived template rows that share a contained-slot name.
    Apply the #93 case-insensitive lookup pattern across the remaining libraries and filter derived rows where a base template is meant.
Residuals from #93 (transport import name matching vs SQL Server case-insensitive collation): - Preview's shared-script, external-system, SMTP, SMS and folder lookups — and the apply-side by-name lookups — still use ordinal comparers while SQL matches case-insensitively, so a differently-cased target can be reported as New and then collide on apply. - `GetTemplatesWithChildrenAsync` does not filter `IsDerived`, so a bundle name can match derived template rows that share a contained-slot name. Apply the #93 case-insensitive lookup pattern across the remaining libraries and filter derived rows where a base template is meant.
dohertj2 added the type:bugpriority:p3 labels 2026-11-09 13:54:28 -05:00
Author
Owner

Fixed on main 7848a3fe: preview matches folders, shared scripts, external systems, SMTP (host) and SMS (account SID) case-insensitively via the #93 ToNameLookup; apply does the same for the three folder lookups, SMTP and SMS (an Overwrite of a case-variant target used to add a duplicate row; folder names are only unique per parent, so the old lookup could also throw). New GetBaseTemplatesWithChildrenAsync excludes derived templates in SQL for preview + Overwrite; GetTemplatesWithChildrenAsync unchanged (export closure / id-based reload need derived rows). Both new import tests + the repository test fail with the fix reverted; reverting only the apply side still fails the duplicate-row assertion. Evidence (after rebase): slnx 0 warnings/0 errors; Host, Communication, AuditLog, Transport, ConfigurationDatabase and Transport.IntegrationTests (143) passed.

Fixed on main 7848a3fe: preview matches folders, shared scripts, external systems, SMTP (host) and SMS (account SID) case-insensitively via the #93 ToNameLookup; apply does the same for the three folder lookups, SMTP and SMS (an Overwrite of a case-variant target used to add a duplicate row; folder names are only unique per parent, so the old lookup could also throw). New GetBaseTemplatesWithChildrenAsync excludes derived templates in SQL for preview + Overwrite; GetTemplatesWithChildrenAsync unchanged (export closure / id-based reload need derived rows). Both new import tests + the repository test fail with the fix reverted; reverting only the apply side still fails the duplicate-row assertion. Evidence (after rebase): slnx 0 warnings/0 errors; Host, Communication, AuditLog, Transport, ConfigurationDatabase and Transport.IntegrationTests (143) passed.
Sign in to join this conversation.