Skip to content

Commit efc41c8

Browse files
authored
Merge pull request #383 from snehaljha-sf/migration_fixes
Migration fixes
2 parents 569aacf + cd4979b commit efc41c8

26 files changed

+421
-234
lines changed

messages/assess.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
"couldNotTruncate": "Could not truncate %s",
1717
"couldNotTruncateOmnniProcess": "Could not truncate OmniProcess. Please make sure your OS/IP is not referenced in an OmniScrirpt or Flex Card.",
1818
"invalidNameTypeSubtypeOrLanguage": "Not a valid Name, Type, SubType or Language",
19-
"invalidOrRepeatingOmniscriptElementNames": "Invalid or Repeating Element Names for Same OmniScript",
19+
"invalidOrRepeatingOmniscriptElementNames": "Invalid or Repeating Element Names for Same Omniscript",
2020
"invalidDataRaptorName": "Invalid name, can not have special characters",
21-
"duplicatedCardName": "Duplicated Flex Card name",
22-
"duplicatedDrName": "Duplicated DataMapper name",
23-
"duplicatedOSName": "Duplicated OmniScript name",
21+
"duplicatedCardName": "Duplicated Flex Card name %s",
22+
"duplicatedDrName": "Duplicated DataMapper name %s",
23+
"duplicatedOSName": "Duplicated %s name %s",
2424
"duplicatedName": "Duplicated name",
25-
"errorWhileActivatingOs": "Could not activate OmniScript / Integration Procedure: ",
25+
"errorWhileActivatingOs": "Could not activate %s: ",
2626
"errorWhileActivatingCard": "Could not activate Card: ",
2727
"errorWhileUploadingCard": "An error ocurred while uploading Card: ",
28-
"errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: ",
28+
"errorWhileCreatingElements": "An error ocurred while saving %s elements: ",
2929
"allVersionsDescription": "Migrate all versions of a component",
3030
"changeMessage": " %s will be changed from %s to %s",
31-
"angularOSWarning": " Angular OmniScript will not be migrated, please convert this to LWC based Omniscript",
31+
"angularOSWarning": " Angular Omniscript will not be migrated, please convert this to LWC based Omniscript",
3232
"relatedObjectGA": "Please select the type of component to assess: 'apex' for Apex classes, 'lwc' for Lightning Web Components, 'flexipage' for FlexiPages, or 'apex,lwc,flexipage' if you want to include all types.",
3333
"apexLwc": "Please select the type of component to assess: 'apex' for Apex classes.",
3434
"invalidNamespace": "The namespace you have passed is not valid namespace, the valid namespace of your org is ",
@@ -37,11 +37,11 @@
3737
"invalidRelatedObjectsOption": "Invalid option provided for -r: %s. Valid options are apex, lwc, expsites, flexipage.",
3838
"formulaSyntaxError": "There was some problem while updating the formula syntax, please check the all the formula's syntax once : %s",
3939
"errorDuringFlexCardAssessment": "Error during FlexCard assessment",
40-
"errorDuringOmniScriptAssessment": "Error during OmniScript assessment",
40+
"errorDuringOmniScriptAssessment": "Error during Omniscript assessment",
4141
"errorDuringGlobalAutoNumberAssessment": "Error during GlobalAutoNumber assessment",
4242
"processingFlexCard": "Processing FlexCard: %s",
4343
"processingDataRaptor": "Processing DataMapper: %s",
44-
"processingOmniScript": "Processing OmniScript: %s",
44+
"processingOmniScript": "Processing Omniscript: %s",
4545
"processingGlobalAutoNumber": "Processing GlobalAutoNumber: %s",
4646
"foundDataRaptorsToAssess": "Found %s DataMappers to assess",
4747
"foundOmniScriptsToAssess": "Found %s %s to assess",
@@ -64,7 +64,7 @@
6464
"assessedGlobalAutoNumbersCount": "Assessed %s GlobalAutoNumbers",
6565
"globalAutoNumberAssessmentCompleted": "The assessment for Global Auto Number is complete.",
6666
"omniScriptAssessment": "%s Assessment",
67-
"assessedOmniScriptsCount": "Assessed %s OmniScripts",
67+
"assessedOmniScriptsCount": "Assessed %s Omniscripts",
6868
"assessedIntegrationProceduresCount": "Assessed %s Integration Procedures",
6969
"omniScriptAssessmentCompleted": "%s assessment completed",
7070
"startingFlexCardAssessment": "Starting FlexCard assessment",
@@ -95,7 +95,7 @@
9595
"methodCallBundleNameUpdated": "Method call bundle name will be updated in %s for class %s method %s",
9696
"cardNameChangeMessage": "Card name will be changed from %s to %s to follow API naming standards",
9797
"authordNameChangeMessage": "Author name will be changed from %s to %s to follow API naming standards",
98-
"omniScriptNameChangeMessage": "OmniScript reference part %s will be changed to %s during migration.",
98+
"omniScriptNameChangeMessage": "Omniscript reference part %s will be changed to %s during migration.",
9999
"dataRaptorNameChangeMessage": "DataMapper reference %s will be changed to %s during migration.",
100100
"integrationProcedureNameChangeMessage": "Integration Procedure reference %s will be changed to %s during migration.",
101101
"integrationProcedureManualUpdateMessage": "Integration Procedure reference %s may need manual updates after migration.",

messages/migrate.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
"couldNotTruncate": "Could not truncate %s",
2121
"couldNotTruncateOmnniProcess": "Could not truncate OmniProcess. Please make sure your OS/IP is not referenced in an OmniScrirpt or Flex Card.",
2222
"invalidNameTypeSubtypeOrLanguage": "Not a valid Name, Type, SubType or Language",
23-
"invalidOrRepeatingOmniscriptElementNames": "Invalid or Repeating Element Names for Same OmniScript",
23+
"invalidOrRepeatingOmniscriptElementNames": "Invalid or Repeating Element Names for Same Omniscript",
2424
"invalidDataRaptorName": "Invalid name, can not have special characters",
25-
"duplicatedCardName": "Duplicated Flex Card name",
26-
"duplicatedDrName": "Duplicated DataMapper name",
27-
"duplicatedOSName": "Duplicated OmniScript name",
28-
"errorWhileActivatingOs": "Could not activate OmniScript / Integration Procedure: ",
25+
"duplicatedCardName": "Duplicated Flex Card name %s",
26+
"duplicatedDrName": "Duplicated DataMapper name %s",
27+
"duplicatedOSName": "Duplicated %s name %s",
28+
"errorWhileActivatingOs": "Could not activate %s: ",
2929
"errorWhileActivatingCard": "Could not activate Card: ",
3030
"errorWhileUploadingCard": "An error ocurred while uploading Card: ",
31-
"errorWhileCreatingElements": "An error ocurred while saving OmniScript elements: ",
31+
"errorWhileCreatingElements": "An error ocurred while saving Omniscript elements: ",
3232
"allVersionsDescription": "Migrate all versions of a component",
3333
"relatedObjectGA": "Please select the type of components to migrate: 'apex' for Apex classes, 'lwc' for Lightning Web Components, 'flexipage' for FlexiPages, 'expsites' for Experience Sites, or 'apex,lwc,flexipage,expsites' if you want to include all types.",
3434
"apexLwc": "Please select the type of components to migrate: 'apex' for Apex classes.",
@@ -104,7 +104,7 @@
104104
"cardAuthorNameChangeMessage": "Card author name has been modified to fit naming rules: %s",
105105
"cardNameChangeMessage": "Card name has been modified to fit naming rules: %s",
106106
"duplicateCardNameMessage": "Potential duplicate: Another card has the same name %s after name cleaning. This may cause conflicts during migration",
107-
"angularOmniscriptWarningMessage": " Angular OmniScript will not be migrated, please convert this to LWC based Omniscript",
107+
"angularOmniscriptWarningMessage": " Angular Omniscript will not be migrated, please convert this to LWC based Omniscript",
108108
"apexFileChangesApplied": "Applied changes to Apex class %s",
109109
"generatingComponentReports": "Generating report for components",
110110
"generatingRelatedObjectReports": "Generating report for related objects",
@@ -201,15 +201,18 @@
201201
"creatingNPMConfigFile": "Creating npm configuration file",
202202
"npmConfigFileCreated": "Npm config file created",
203203
"authKeyEnvVarNotSet": "The OMA_AUTH_KEY environment variable isn’t set. LWCs won't be deployed.",
204+
"manualDeploymentSteps": "<a href='%s' target='_blank'>Please refer to this documentation for manual deployment process</a>",
205+
"errorRetrievingMetadata": "Error retrieving metadata",
206+
"deploymentConsentNotGiven": "Deployment consent not given, manual deployment is required",
204207
"experienceSiteException": "We’ve encountered an exception while processing Experience Cloud sites.",
205208
"reservedKeysFoundInPropertySet": "Reserved keys found in any of output response transformation fields: %s.",
206209
"incompleteMigrationDetected": "We couldn't complete the migration process",
207210
"errorComponentMapping": "Error during component pre-processing: %s",
208211
"startingComponentPreProcessing": "Pre-processing components for name mapping",
209212
"completeComponentMappingMessage": "Registered name mappings for %s components",
210213
"componentMappingNotFound": "No registry mapping found for %s component: %s, using fallback cleaning",
211-
"flexCardWithAngularOmniScriptWarning": "FlexCard has dependencies on Angular Omniscript(s) which are not migrated. Please convert OmniScript(s) to LWC before migrating this FlexCard.",
212-
"angularOmniScriptDependencyWarning": "Element '%s' references Angular Omniscript '%s' which will not be migrated. Consider converting the referenced OmniScript to LWC",
214+
"flexCardWithAngularOmniScriptWarning": "FlexCard has dependencies on Angular Omniscript(s) which are not migrated. Please convert Omniscript(s) to LWC before migrating this FlexCard.",
215+
"angularOmniScriptDependencyWarning": "Element '%s' references Angular Omniscript '%s' which will not be migrated. Consider converting the referenced Omniscript to LWC",
213216
"skipFlexcardAngularOmniScriptDependencyWarning": "Skipping FlexCard %s due to Angular Omniscript dependencies",
214217
"flexCardMigrationProcessingMessage": "Processing %s FlexCards for migration (%s skipped due to Angular dependencies)",
215218
"noMetadataToDeploy": "No metadata to deploy",
@@ -235,6 +238,8 @@
235238
"skipStandardRuntimeDueToFailure": "Skipping Standard Runtime enablement due to designer setup failure",
236239
"errorCheckingStandardDesigner": "Failed to check standard designer status for package %s: %s",
237240
"relatedObjectsConsentNotGiven": "The related objects will not be processed because the user declined consent.",
241+
"fileUpdatedToAllowRemoteCalls": "File has been updated to allow remote calls",
242+
"fileUpdatedToAllowCalls": "File has been updated to allow calls",
238243
"startingCustomLabelMigration": "Starting Custom Labels migration",
239244
"customLabelMigrationCompleted": "Custom Labels migration completed. %s labels processed out of %s total",
240245
"errorDuringCustomLabelMigration": "Error during Custom Labels migration: %s",
@@ -254,4 +259,4 @@
254259
"errorFetchingCustomLabels": "Error fetching custom labels: %s",
255260
"customLabelAssessmentSummary": "Custom Label with same name and different value is already exist without namespace.",
256261
"generatedCustomLabelAssessmentReportPage": "Generated custom label assessment report page %s of %s with %s labels"
257-
}
262+
}

src/commands/omnistudio/migration/migrate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ export default class Migrate extends OmniStudioBaseCommand {
674674
} else if (!recordResults || recordResults.hasErrors) {
675675
obj.status = 'Failed';
676676
} else {
677-
obj.status = 'Complete';
677+
obj.status = 'Successfully migrated';
678678
}
679679

680680
obj.errors = errors;

src/migration/customLabels.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
2+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
3+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
4+
/* eslint-disable @typescript-eslint/no-unsafe-call */
15
import { UX } from '@salesforce/command';
26
import { Connection, Messages } from '@salesforce/core';
37
import { NetUtils, RequestMethod } from '../utils/net';

src/migration/dataraptor.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class DataRaptorMigrationTool extends BaseMigrationTool implements Migrat
158158

159159
// Verify duplicated names before trying to submitt
160160
if (duplicatedNames.has(transformedDataRaptor['Name'])) {
161-
this.setRecordErrors(dr, this.messages.getMessage('duplicatedDrName'));
161+
this.setRecordErrors(dr, this.messages.getMessage('duplicatedDrName', [transformedDataRaptor['Name']]));
162162
originalDrRecords.set(recordId, dr);
163163
continue;
164164
}
@@ -179,10 +179,7 @@ export class DataRaptorMigrationTool extends BaseMigrationTool implements Migrat
179179
if (drUploadResponse && drUploadResponse.success === true) {
180180
const items = await this.getItemsForDataRaptor(dataRaptorItemsData, name, drUploadResponse.id);
181181

182-
// Check for name changes
183-
if (transformedDataRaptor[DRBundleMappings.Name] !== dr['Name']) {
184-
drUploadResponse.newName = transformedDataRaptor[DRBundleMappings.Name];
185-
}
182+
drUploadResponse.newName = transformedDataRaptor[DRBundleMappings.Name];
186183

187184
// Move the items
188185
await this.uploadTransformedData(DataRaptorMigrationTool.OMNIDATATRANSFORMITEM_NAME, items);
@@ -193,7 +190,7 @@ export class DataRaptorMigrationTool extends BaseMigrationTool implements Migrat
193190
progressBar.stop();
194191

195192
return {
196-
name: 'Data Mapper',
193+
name: 'DataMappers',
197194
results: drUploadInfo,
198195
records: originalDrRecords,
199196
};

0 commit comments

Comments
 (0)