diff --git a/KVA/Migration.Tool.Source/Handlers/MigrateFormsCommandHandler.cs b/KVA/Migration.Tool.Source/Handlers/MigrateFormsCommandHandler.cs index 239657aa..e833ef5a 100644 --- a/KVA/Migration.Tool.Source/Handlers/MigrateFormsCommandHandler.cs +++ b/KVA/Migration.Tool.Source/Handlers/MigrateFormsCommandHandler.cs @@ -70,7 +70,15 @@ public async Task Handle(MigrateFormsCommand request, Cancellatio try { + int formItems = cmsForm.FormItems; BizFormInfo.Provider.Set(cmsForm!); + + // Update FormItems manually, as BizFormInfo provider always resets the value to 0 + using (var conn = ConnectionHelper.GetConnection()) + { + conn.DataConnection.ExecuteNonQuery("UPDATE [CMS_Form] SET FormItems=@formItems WHERE FormID=@formID", new QueryDataParameters() { { "formItems", formItems }, { "formID", cmsForm.FormID } }, QueryTypeEnum.SQLQuery, true); + } + logger.LogEntitySetAction(newInstance, cmsForm); primaryKeyMappingContext.SetMapping( diff --git a/KVA/Migration.Tool.Source/Services/AssetFacade.cs b/KVA/Migration.Tool.Source/Services/AssetFacade.cs index bcf1b5cc..fda4ab42 100644 --- a/KVA/Migration.Tool.Source/Services/AssetFacade.cs +++ b/KVA/Migration.Tool.Source/Services/AssetFacade.cs @@ -118,7 +118,7 @@ public async Task FromMediaFile(IMediaFile mediaFile VersionStatus = VersionStatus.Published, ContentItemData = new Dictionary { - ["Asset"] = new AssetFileSource + [LegacyMediaFileAssetField.Column!] = new AssetFileSource { ContentItemGuid = translatedMediaGuid, Identifier = GuidHelper.CreateAssetGuid(translatedMediaGuid, contentLanguageName), @@ -172,7 +172,7 @@ public async Task FromAttachment(ICmsAttachment atta VersionStatus = VersionStatus.Published, ContentItemData = new Dictionary { - ["Asset"] = new AssetDataSource + [LegacyAttachmentAssetField.Column!] = new AssetDataSource { ContentItemGuid = translatedAttachmentGuid, Identifier = GuidHelper.CreateAssetGuid(translatedAttachmentGuid, contentLanguageName), @@ -311,7 +311,7 @@ private void AssertSuccess(IImportResult importResult, IUmtModel model) internal static readonly FormField LegacyMediaFileAssetField = new() { - Column = "Asset", + Column = "LegacyMediaFileAsset", ColumnType = "contentitemasset", AllowEmpty = true, Visible = true, @@ -339,7 +339,7 @@ private void AssertSuccess(IImportResult importResult, IUmtModel model) internal static readonly FormField LegacyAttachmentAssetField = new() { - Column = "Asset", + Column = "LegacyAttachmentAsset", ColumnType = "contentitemasset", AllowEmpty = true, Visible = true, diff --git a/docs/Supported-Data.md b/docs/Supported-Data.md index 71747744..a82ab015 100644 --- a/docs/Supported-Data.md +++ b/docs/Supported-Data.md @@ -89,5 +89,7 @@ The following types of data exist in Xperience by Kentico but are currently **no 4. Recalculate the contact groups. - **License keys** - Xperience by Kentico uses a different license key format. +- **Marketing automation** + - Migration of Marketing automation is currently not supported Additionally, object values or other content with **Macros** will not work correctly after the migration. Macro expressions are currently not supported for most data in Xperience by Kentico.