Skip to content

Commit 219bd7e

Browse files
authored
Merge pull request #305 from sf-kishore-kurri/u/kkurri/W-18480467
feat: W-18480467: Skipping the Angular based Omniscripts from migration
2 parents 37d6ffa + 76f3c8e commit 219bd7e

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

messages/migrate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"integrationProcedureManualUpdateMessage": "Integration Procedure reference {0} may need manual updates after migration.",
8383
"cardAuthorNameChangeMessage": "Card author name has been modified to fit naming rules: {0}",
8484
"cardNameChangeMessage": "Card name has been modified to fit naming rules: {0}",
85-
"duplicateCardNameMessage": "Potential duplicate: Another card has the same name {0} after name cleaning. This may cause conflicts during migration"
85+
"duplicateCardNameMessage": "Potential duplicate: Another card has the same name {0} after name cleaning. This may cause conflicts during migration",
86+
"angularOmniscriptWarningMessage": " Angular OmniScript will not be migrated, please convert this to LWC based Omniscript"
8687
}
8788

src/migration/omniscript.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,30 @@ export class OmniScriptMigrationTool extends BaseMigrationTool implements Migrat
439439
// Create a map of the original OmniScript__c records
440440
originalOsRecords.set(recordId, omniscript);
441441

442+
// Check if this is an Angular OmniScript that should be skipped
443+
const omniProcessType = omniscript[`${this.namespacePrefix}IsProcedure__c`] ? 'Integration Procedure' : 'OmniScript';
444+
if (omniProcessType === 'OmniScript') {
445+
const type = omniscript[this.namespacePrefix + 'IsLwcEnabled__c'] ? 'LWC' : 'Angular';
446+
if (type === 'Angular') {
447+
// Skip Angular OmniScripts and add a warning record
448+
const warningMessage = this.messages.getMessage('angularOmniscriptWarningMessage');
449+
const skippedResponse: UploadRecordResult = {
450+
referenceId: recordId,
451+
id: '',
452+
success: false,
453+
hasErrors: true,
454+
errors: [warningMessage],
455+
warnings: [],
456+
newName: '',
457+
};
458+
osUploadInfo.set(recordId, skippedResponse);
459+
progressBar.stop();
460+
Logger.warn(warningMessage);
461+
progressBar.start(omniscripts.length, progressCounter);
462+
continue;
463+
}
464+
}
465+
442466
// Record is Active, Elements can't be Added, Modified or Deleted for that OS/IP
443467
omniscript[`${this.namespacePrefix}IsActive__c`] = false;
444468

0 commit comments

Comments
 (0)