Fix phone not empty filter (#15790)
This PR fixes the filter on not empty phones. We can end up with phone numbers that only have a country code, but it makes no sense to consider this special edge case "not empty". If we have no phone number, then it's empty, so this PR applies this particular use case for NOT EMPTY filter on phone fields. Fixes https://github.com/twentyhq/twenty/issues/15638
This commit is contained in:
-28
@@ -740,20 +740,6 @@ describe('should work as expected for the different field types', () => {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
or: [
|
||||
{
|
||||
phones: {
|
||||
primaryPhoneCallingCode: { is: 'NULL' },
|
||||
},
|
||||
},
|
||||
{
|
||||
phones: {
|
||||
primaryPhoneCallingCode: { ilike: '' },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
or: [
|
||||
{
|
||||
@@ -787,20 +773,6 @@ describe('should work as expected for the different field types', () => {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
or: [
|
||||
{
|
||||
phones: {
|
||||
primaryPhoneCallingCode: { is: 'NULL' },
|
||||
},
|
||||
},
|
||||
{
|
||||
phones: {
|
||||
primaryPhoneCallingCode: { ilike: '' },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
or: [
|
||||
{
|
||||
|
||||
@@ -70,20 +70,6 @@ export const getEmptyRecordGqlOperationFilter = ({
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
or: [
|
||||
{
|
||||
[correspondingField.name]: {
|
||||
primaryPhoneCallingCode: { is: 'NULL' },
|
||||
} as PhonesFilter,
|
||||
},
|
||||
{
|
||||
[correspondingField.name]: {
|
||||
primaryPhoneCallingCode: { ilike: '' },
|
||||
} as PhonesFilter,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
or: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user