@@ -935,6 +935,7 @@ export class CardMigrationTool extends BaseMigrationTool implements MigrationToo
935935 }
936936
937937 uploadResult . newName = transformedCardName ;
938+ uploadResult . actualName = transformedCard [ 'Name' ] ; // This is required as storage needs name without version, for replacement in other references
938939 if ( transformedCard [ 'Name' ] !== card [ 'Name' ] ) {
939940 uploadResult . warnings . unshift ( this . messages . getMessage ( 'cardNameChangeMessage' , [ transformedCardName ] ) ) ;
940941 }
@@ -1000,6 +1001,10 @@ export class CardMigrationTool extends BaseMigrationTool implements MigrationToo
10001001 if ( flexCardAssessmentInfo . errors && flexCardAssessmentInfo . errors . length > 0 ) {
10011002 value . error = flexCardAssessmentInfo . errors ;
10021003 value . migrationSuccess = false ;
1004+ } else if ( flexCardAssessmentInfo . migrationStatus === 'Needs manual intervention' ) {
1005+ // Duplicate name and other critical warnings
1006+ value . error = flexCardAssessmentInfo . warnings ;
1007+ value . migrationSuccess = false ;
10031008 } else {
10041009 value . migrationSuccess = true ;
10051010 }
@@ -1059,13 +1064,19 @@ export class CardMigrationTool extends BaseMigrationTool implements MigrationToo
10591064
10601065 const originalName : string = oldrecord [ 'Name' ] ;
10611066 let value : FlexcardStorage = {
1062- name : newrecord ?. newName ,
1067+ name : newrecord ?. actualName ,
10631068 isDuplicate : false ,
10641069 originalName : originalName ,
10651070 } ;
10661071
10671072 if ( newrecord === undefined ) {
1068- value . error = [ 'Migration Failed' ] ;
1073+ // Card was not migrated - check if original record has error details
1074+ if ( oldrecord [ 'errors' ] && Array . isArray ( oldrecord [ 'errors' ] ) ) {
1075+ value . error = oldrecord [ 'errors' ] ;
1076+ } else {
1077+ value . error = [ 'Migration Failed' ] ;
1078+ }
1079+ value . migrationSuccess = false ;
10691080 } else {
10701081 if ( newrecord . hasErrors ) {
10711082 value . error = newrecord . errors ;
0 commit comments