Skip to content

The open alternative to Salesforce, designed for AI.

[Fix] Handle deprecated viewFilterOperand - follow-up (#14841)

Marie98544a247973
diff --git a/packages/twenty-shared/src/types/ViewFilterOperandDeprecated.ts b/packages/twenty-shared/src/types/ViewFilterOperandDeprecated.ts
index 04c38a1c21b..a7585309316 100644
--- a/packages/twenty-shared/src/types/ViewFilterOperandDeprecated.ts
+++ b/packages/twenty-shared/src/types/ViewFilterOperandDeprecated.ts
@@ -2,8 +2,8 @@ export enum ViewFilterOperandDeprecated {
Is = 'is',
IsNotNull = 'isNotNull',
IsNot = 'isNot',
- LessThanOrEqual = 'lessThanOrEqual',
- GreaterThanOrEqual = 'greaterThanOrEqual',
+ LessThanOrEqual = 'lessThan',
+ GreaterThanOrEqual = 'greaterThan',
IsBefore = 'isBefore',
IsAfter = 'isAfter',
Contains = 'contains',
diff --git a/packages/twenty-shared/src/utils/filter/utils/convert-view-filter-operand-to-core-operand.util.ts b/packages/twenty-shared/src/utils/filter/utils/convert-view-filter-operand-to-core-operand.util.ts
index 51755bb46de..9b8746a4082 100644
--- a/packages/twenty-shared/src/utils/filter/utils/convert-view-filter-operand-to-core-operand.util.ts
+++ b/packages/twenty-shared/src/utils/filter/utils/convert-view-filter-operand-to-core-operand.util.ts
@@ -1,22 +1,6 @@
import { ViewFilterOperand, ViewFilterOperandDeprecated } from '@/types';
const operandMapping: Record<string, ViewFilterOperand> = {
- Is: ViewFilterOperand.IS,
- IsNotNull: ViewFilterOperand.IS_NOT_NULL,
- IsNot: ViewFilterOperand.IS_NOT,
- LessThanOrEqual: ViewFilterOperand.LESS_THAN_OR_EQUAL,
- GreaterThanOrEqual: ViewFilterOperand.GREATER_THAN_OR_EQUAL,
- IsBefore: ViewFilterOperand.IS_BEFORE,
- IsAfter: ViewFilterOperand.IS_AFTER,
- Contains: ViewFilterOperand.CONTAINS,
- DoesNotContain: ViewFilterOperand.DOES_NOT_CONTAIN,
- IsEmpty: ViewFilterOperand.IS_EMPTY,
- IsNotEmpty: ViewFilterOperand.IS_NOT_EMPTY,
- IsRelative: ViewFilterOperand.IS_RELATIVE,
- IsInPast: ViewFilterOperand.IS_IN_PAST,
- IsInFuture: ViewFilterOperand.IS_IN_FUTURE,
- IsToday: ViewFilterOperand.IS_TODAY,
- VectorSearch: ViewFilterOperand.VECTOR_SEARCH,
[ViewFilterOperandDeprecated.Is]: ViewFilterOperand.IS,
[ViewFilterOperandDeprecated.IsNotNull]: ViewFilterOperand.IS_NOT_NULL,
[ViewFilterOperandDeprecated.IsNot]: ViewFilterOperand.IS_NOT,