diff --git a/src/plugins/wizard/public/application/utils/get_top_nav_config.tsx b/src/plugins/wizard/public/application/utils/get_top_nav_config.tsx index b9650dc2ed4b..8d83807c058f 100644 --- a/src/plugins/wizard/public/application/utils/get_top_nav_config.tsx +++ b/src/plugins/wizard/public/application/utils/get_top_nav_config.tsx @@ -57,9 +57,14 @@ export const getTopNavConfig = ( visualizationState, styleState, saveDisabledReason, - dispatch + dispatch, }: TopNavConfigParams, - { history, toastNotifications, i18n: { Context: I18nContext }, data: { indexPatterns } }: WizardServices + { + history, + toastNotifications, + i18n: { Context: I18nContext }, + data: { indexPatterns }, + }: WizardServices ) => { const topNavConfig: TopNavMenuData[] = [ { diff --git a/src/plugins/wizard/public/saved_visualizations/_saved_vis.ts b/src/plugins/wizard/public/saved_visualizations/_saved_vis.ts index 672d382ebe12..d269642bd8bc 100644 --- a/src/plugins/wizard/public/saved_visualizations/_saved_vis.ts +++ b/src/plugins/wizard/public/saved_visualizations/_saved_vis.ts @@ -44,7 +44,7 @@ export function createSavedWizardVisClass(services: SavedObjectOpenSearchDashboa description: '', visualizationState: '{}', styleState: '{}', - version: 1, + version: 2, }, }); this.showInRecentlyAccessed = true; diff --git a/src/plugins/wizard/server/saved_objects/wizard_migration.test.ts b/src/plugins/wizard/server/saved_objects/wizard_migration.test.ts index 5b598ad3bc02..0e9248e1951f 100644 --- a/src/plugins/wizard/server/saved_objects/wizard_migration.test.ts +++ b/src/plugins/wizard/server/saved_objects/wizard_migration.test.ts @@ -8,9 +8,9 @@ import { wizardSavedObjectTypeMigrations } from './wizard_migration'; const savedObjectMigrationContext = (null as unknown) as SavedObjectMigrationContext; -describe('3.0.0', () => { +describe('2.3.0', () => { const migrate = (doc: any) => - wizardSavedObjectTypeMigrations['3.0.0']( + wizardSavedObjectTypeMigrations['2.3.0']( doc as Parameters[0], savedObjectMigrationContext ); @@ -76,6 +76,7 @@ describe('3.0.0', () => { activeVisualization: {}, indexPattern: 'indexPatternId', }), + version: 1, }, references: [], }); @@ -87,6 +88,7 @@ describe('3.0.0', () => { searchFields: {}, activeVisualization: {}, }), + version: 2, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ indexRefName: 'kibanaSavedObjectMeta.searchSourceJSON.index', diff --git a/src/plugins/wizard/server/saved_objects/wizard_migration.ts b/src/plugins/wizard/server/saved_objects/wizard_migration.ts index 1526a4d0211f..dcbaf8252218 100644 --- a/src/plugins/wizard/server/saved_objects/wizard_migration.ts +++ b/src/plugins/wizard/server/saved_objects/wizard_migration.ts @@ -28,6 +28,7 @@ const migrateIndexPattern: SavedObjectMigrationFn = (doc) => { type: 'index-pattern', id: indexPatternId, }); + doc.attributes.version = 2; return { ...doc, @@ -46,5 +47,5 @@ const migrateIndexPattern: SavedObjectMigrationFn = (doc) => { }; export const wizardSavedObjectTypeMigrations = { - '3.0.0': flow(migrateIndexPattern), + '2.3.0': flow(migrateIndexPattern), };