Skip to content

Commit 801bf7c

Browse files
authored
quick fix for positionInViewFilterGroup (#9223)
fix 9206 In the future, we should have a look at the column naming "positionInViewFilterGroup" because it breaks the SQL queries in `record-position-query.factory.ts` for viewFilter tablenames
1 parent b52c23b commit 801bf7c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/twenty-server/src/engine/api/graphql/workspace-query-runner/factories/__tests__/query-runner-args.factory.spec.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,34 +22,34 @@ describe('QueryRunnerArgsFactory', () => {
2222
{
2323
type: FieldMetadataType.POSITION,
2424
isCustom: true,
25-
nameSingular: 'position',
25+
name: 'position',
2626
},
2727
{
2828
type: FieldMetadataType.NUMBER,
2929
isCustom: true,
30-
nameSingular: 'testNumber',
30+
name: 'testNumber',
3131
},
3232
{
3333
type: FieldMetadataType.TEXT,
3434
isCustom: true,
35-
nameSingular: 'otherField',
35+
name: 'otherField',
3636
},
3737
],
3838
fieldsByName: {
3939
position: {
4040
type: FieldMetadataType.POSITION,
4141
isCustom: true,
42-
nameSingular: 'position',
42+
name: 'position',
4343
},
4444
testNumber: {
4545
type: FieldMetadataType.NUMBER,
4646
isCustom: true,
47-
nameSingular: 'testNumber',
47+
name: 'testNumber',
4848
},
4949
otherField: {
5050
type: FieldMetadataType.TEXT,
5151
isCustom: true,
52-
nameSingular: 'otherField',
52+
name: 'otherField',
5353
},
5454
} as unknown as FieldMetadataMap,
5555
},

packages/twenty-server/src/engine/api/graphql/workspace-query-runner/factories/query-runner-args.factory.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export class QueryRunnerArgsFactory {
4040

4141
const shouldBackfillPosition =
4242
options.objectMetadataItemWithFieldMaps.fields.some(
43-
(field) => field.type === FieldMetadataType.POSITION,
43+
(field) =>
44+
field.type === FieldMetadataType.POSITION &&
45+
field.name === 'position',
4446
);
4547

4648
switch (resolverArgsType) {

0 commit comments

Comments
 (0)