[BREAKING_CHANGE_VIEW_SORT] Refactor view sort to v2 (#17609)

Fixes https://github.com/twentyhq/core-team-issues/issues/2187

---------

Co-authored-by: prastoin <paul@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
BOHEUS
2026-03-04 12:48:58 +00:00
committed by GitHub
parent 906a0aed38
commit c97d872b9f
135 changed files with 3262 additions and 815 deletions
@@ -5,6 +5,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_FOREIGN_KEY_AGGREGATOR_PROPERTIES should matc
"agent": [],
"commandMenuItem": [],
"fieldMetadata": [
"viewSortUniversalIdentifiers",
"viewFieldUniversalIdentifiers",
"viewFilterUniversalIdentifiers",
"kanbanAggregateOperationViewUniversalIdentifiers",
@@ -56,6 +57,7 @@ exports[`ALL_UNIVERSAL_FLAT_ENTITY_FOREIGN_KEY_AGGREGATOR_PROPERTIES should matc
"viewFilterUniversalIdentifiers",
],
"viewGroup": [],
"viewSort": [],
"webhook": [],
}
`;
@@ -18,6 +18,7 @@ export const ALL_JSONB_PROPERTIES_WITH_SERIALIZED_RELATION_BY_METADATA_NAME = {
viewFieldGroup: {},
viewFilter: {},
viewFilterGroup: {},
viewSort: {},
index: {},
role: {},
roleTarget: {},
@@ -0,0 +1,7 @@
import { type ViewSortEntity } from 'src/engine/metadata-modules/view-sort/entities/view-sort.entity';
import { type UniversalFlatEntityFrom } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-entity-from.type';
export type UniversalFlatViewSort = UniversalFlatEntityFrom<
ViewSortEntity,
'viewSort'
>;
@@ -1,8 +1,4 @@
import { type ViewEntity } from 'src/engine/metadata-modules/view/entities/view.entity';
import { type UniversalFlatEntityFrom } from 'src/engine/workspace-manager/workspace-migration/universal-flat-entity/types/universal-flat-entity-from.type';
// TODO remove once viewSorts has been migrated to v2
export type UniversalFlatView = UniversalFlatEntityFrom<
Omit<ViewEntity, 'viewSorts'>,
'view'
>;
export type UniversalFlatView = UniversalFlatEntityFrom<ViewEntity, 'view'>;
@@ -45,6 +45,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect a crea
"viewFieldUniversalIdentifiers": [],
"viewFilterIds": [],
"viewFilterUniversalIdentifiers": [],
"viewSortIds": [],
"viewSortUniversalIdentifiers": [],
"workspaceId": "workspace-id-1",
},
},
@@ -106,6 +108,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect a dele
"viewFieldUniversalIdentifiers": [],
"viewFilterIds": [],
"viewFilterUniversalIdentifiers": [],
"viewSortIds": [],
"viewSortUniversalIdentifiers": [],
"workspaceId": "workspace-id-1",
},
},
@@ -181,6 +185,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect create
"viewFieldUniversalIdentifiers": [],
"viewFilterIds": [],
"viewFilterUniversalIdentifiers": [],
"viewSortIds": [],
"viewSortUniversalIdentifiers": [],
"workspaceId": "workspace-id-1",
},
},
@@ -228,6 +234,8 @@ exports[`flatEntityDeletedCreatedUpdatedMatrixDispatcher It should detect create
"viewFieldUniversalIdentifiers": [],
"viewFilterIds": [],
"viewFilterUniversalIdentifiers": [],
"viewSortIds": [],
"viewSortUniversalIdentifiers": [],
"workspaceId": "workspace-id-1",
},
},