Fixes greater than or equal and less than and equal filters (#13033)

This PR fixes a mismatch between the filter operation we have on NUMBER
and RATING field types, and the labels we use for those filters in the
application.

What is actually used is : 
- Greater than or equal
- Less than or equal

But unfortunately, until now we display "less than" and "greater than"
everywhere.

This PR fixes that.

We would still have to change the value that is saved in viewFilter
table from `greaterThan` to `greaterThanOrEqual` and likewise for less
than, but it would require a careful migration, and for now just
changing the display labels is enough.

See follow-up issue for migration of the DB values :
https://github.com/twentyhq/core-team-issues/issues/1196

Fixes https://github.com/twentyhq/twenty/issues/13000
This commit is contained in:
Lucas Bordeau
2025-07-04 16:26:19 +02:00
committed by GitHub
parent 8a5a9554d9
commit 0dcfca2ba3
14 changed files with 61 additions and 60 deletions

View File

@ -2,8 +2,8 @@ export enum ViewFilterOperand {
Is = 'is',
IsNotNull = 'isNotNull',
IsNot = 'isNot',
LessThan = 'lessThan',
GreaterThan = 'greaterThan',
LessThanOrEqual = 'lessThan', // TODO: we could change this to 'lessThanOrEqual' for consistency but it would require a migration
GreaterThanOrEqual = 'greaterThan', // TODO: we could change this to 'greaterThanOrEqual' for consistency but it would require a migration
IsBefore = 'isBefore',
IsAfter = 'isAfter',
Contains = 'contains',