diff --git a/models/tracker/src/migration.ts b/models/tracker/src/migration.ts index 1da50efed8..ce47670af8 100644 --- a/models/tracker/src/migration.ts +++ b/models/tracker/src/migration.ts @@ -368,6 +368,18 @@ async function migrateIssueStatuses (client: MigrationClient): Promise { } } ) + await client.update( + DOMAIN_TX, + { + objectClass: core.class.Status, + 'attributes.ofAttribute': tracker.attribute.IssueStatus + }, + { + $set: { + objectClass: tracker.class.IssueStatus + } + } + ) await client.update( DOMAIN_STATUS, @@ -386,6 +398,10 @@ async function migrateIssueStatuses (client: MigrationClient): Promise { export const trackerOperation: MigrateOperation = { async preMigrate (client: MigrationClient, logger: ModelLogger): Promise { await tryMigrate(client, trackerId, [ + { + state: 'fixIncorrectIssueStatuses', + func: migrateIssueStatuses + }, { state: 'migrate-default-statuses', func: (client) => migrateDefaultStatuses(client, logger) @@ -402,10 +418,6 @@ export const trackerOperation: MigrateOperation = { state: 'passIdentifierToParentInfo', func: passIdentifierToParentInfo }, - { - state: 'fixIncorrectIssueStatuses', - func: migrateIssueStatuses - }, { state: 'statusesToModel-2', func: migrateStatusesToModel