From d9626f5d25f0d96cb7fc475fe7a1a548ecb078e5 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 7 Feb 2024 14:08:20 +0000 Subject: [PATCH] fix: handle formula which outputs datetime as result --- packages/nocodb/src/db/conditionV2.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/nocodb/src/db/conditionV2.ts b/packages/nocodb/src/db/conditionV2.ts index 9ab45c1634..66e08c3ad5 100644 --- a/packages/nocodb/src/db/conditionV2.ts +++ b/packages/nocodb/src/db/conditionV2.ts @@ -1,5 +1,6 @@ import { FormulaDataTypes, + getEquivalentUIType, isDateMonthFormat, isNumericCol, RelationTypes, @@ -574,6 +575,9 @@ const parseConditionV2 = async ( : 'YYYY-MM-DD HH:mm:ssZ'; if ( + (column.uidt === UITypes.Formula && + getEquivalentUIType({ formulaColumn: column.colOptions }) == + UITypes.DateTime) || [ UITypes.Date, UITypes.DateTime, @@ -668,6 +672,9 @@ const parseConditionV2 = async ( case 'eq': if (qb?.client?.config?.client === 'mysql2') { if ( + (column.uidt === UITypes.Formula && + getEquivalentUIType({ formulaColumn: column.colOptions }) == + UITypes.DateTime) || [ UITypes.Duration, UITypes.Currency, @@ -692,6 +699,9 @@ const parseConditionV2 = async ( } } else { if ( + (column.uidt === UITypes.Formula && + getEquivalentUIType({ formulaColumn: column.colOptions }) == + UITypes.DateTime) || [ UITypes.DateTime, UITypes.CreatedTime,