diff --git a/models/contact/src/migration.ts b/models/contact/src/migration.ts index 112f592757..0da0a3d6ec 100644 --- a/models/contact/src/migration.ts +++ b/models/contact/src/migration.ts @@ -43,6 +43,7 @@ async function createSpace (tx: TxOperations): Promise { } } +let totalCreateOn = 0 async function setCreate (client: MigrationClient): Promise { while (true) { const docs = await client.find( @@ -58,7 +59,8 @@ async function setCreate (client: MigrationClient): Promise { if (docs.length === 0) { break } - console.log('processing createOn migration', docs.length) + totalCreateOn += docs.length + console.log('processing createOn migration', totalCreateOn) const creates = await client.find>(DOMAIN_TX, { objectId: { $in: docs.map((it) => it._id) }, _class: core.class.TxCreateDoc @@ -84,6 +86,16 @@ async function setCreate (client: MigrationClient): Promise { 'attributes.createOn': tx.modifiedOn } ) + } else { + await client.update( + DOMAIN_CONTACT, + { + _id: doc._id + }, + { + createOn: doc.modifiedOn + } + ) } } } diff --git a/plugins/contact-resources/src/components/ContactsTabs.svelte b/plugins/contact-resources/src/components/ContactsTabs.svelte index a7a42594e2..305b2b4b4c 100644 --- a/plugins/contact-resources/src/components/ContactsTabs.svelte +++ b/plugins/contact-resources/src/components/ContactsTabs.svelte @@ -13,10 +13,10 @@ // limitations under the License. --> {#if tabs && tabs.length > 1} -
+
{:else if tabs?.[0]}