Skip to content

Commit 76f3c8e

Browse files
feat: W-18480467: Skipping the Angular based Omniscripts from migration
1 parent 041fde4 commit 76f3c8e

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

messages/migrate.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
"dataRaptorNameChangeMessage": "DataRaptor reference {0} will be changed to {1} during migration.",
7777
"integrationProcedureNameChangeMessage": "Integration Procedure reference {0} will be changed to {1} during migration.",
7878
"integrationProcedureManualUpdateMessage": "Integration Procedure reference {0} may need manual updates after migration.",
79-
"alreadyStandardModel": "The org is already on standard data model.",
8079
"cardAuthorNameChangeMessage": "Card author name has been modified to fit naming rules: {0}",
8180
"cardNameChangeMessage": "Card name has been modified to fit naming rules: {0}",
82-
"duplicateCardNameMessage": "Potential duplicate: Another card has the same name {0} after name cleaning. This may cause conflicts during migration"
81+
"duplicateCardNameMessage": "Potential duplicate: Another card has the same name {0} after name cleaning. This may cause conflicts during migration",
82+
"angularOmniscriptWarningMessage": " Angular OmniScript will not be migrated, please convert this to LWC based Omniscript"
8383
}

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)