mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-22 19:41:53 +03:00
Fix sync metadata default value not being synced (#9163)
## Context
We used to not sync defaultValue and recently introduced a change in
3340f01c31/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/comparators/workspace-field.comparator.ts
with shouldNotOverrideDefaultValue to sync it for specific field
metadata type that can't be overwritten by the user.
This means we should have removed 'defaultValue' from
commonFieldPropertiesToIgnore list since it was handled differently.
This PR fixes that
Before
<img width="792" alt="Screenshot 2024-12-20 at 11 04 09"
src="https://github.com/user-attachments/assets/1771c5a3-2162-4013-8a08-c54d2619fda3"
/>
After
<img width="798" alt="Screenshot 2024-12-20 at 11 04 55"
src="https://github.com/user-attachments/assets/33e09f16-c615-4a43-950d-d2df955fb196"
/>
This commit is contained in:
parent
1acf845101
commit
779c503381
@ -9,7 +9,7 @@ import { RecordPositionBackfillService } from 'src/engine/api/graphql/workspace-
|
||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
|
||||
@Command({
|
||||
name: 'migrate-0.40:backfill-record-position',
|
||||
name: 'upgrade-0.40:record-position-backfill',
|
||||
description: 'Backfill record position',
|
||||
})
|
||||
export class RecordPositionBackfillCommand extends ActiveWorkspacesCommandRunner {
|
||||
|
@ -38,6 +38,12 @@ export class UpgradeTo0_40Command extends ActiveWorkspacesCommandRunner {
|
||||
'Running command to upgrade to 0.40: must start with phone calling code otherwise SyncMetadata will fail',
|
||||
);
|
||||
|
||||
await this.recordPositionBackfillCommand.executeActiveWorkspacesCommand(
|
||||
passedParam,
|
||||
options,
|
||||
workspaceIds,
|
||||
);
|
||||
|
||||
await this.phoneCallingCodeCreateColumnCommand.executeActiveWorkspacesCommand(
|
||||
passedParam,
|
||||
options,
|
||||
@ -50,12 +56,6 @@ export class UpgradeTo0_40Command extends ActiveWorkspacesCommandRunner {
|
||||
workspaceIds,
|
||||
);
|
||||
|
||||
await this.recordPositionBackfillCommand.executeActiveWorkspacesCommand(
|
||||
passedParam,
|
||||
options,
|
||||
workspaceIds,
|
||||
);
|
||||
|
||||
await this.viewGroupNoValueBackfillCommand.executeActiveWorkspacesCommand(
|
||||
passedParam,
|
||||
options,
|
||||
|
@ -26,7 +26,6 @@ const commonFieldPropertiesToIgnore = [
|
||||
'gate',
|
||||
'asExpression',
|
||||
'generatedType',
|
||||
'defaultValue',
|
||||
'isLabelSyncedWithName',
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user