when I connect a filter form to a chart and try to find user where dob = today, it will return dob = yesterday. you can try to test here: https://al6vo1wjap21.v12.demo.nocobase.com/admin/8onghtvata4
when selected 9/9/2026, it doesn’t show any records.
but when selected 9/10/2026, it shows.
fix: \packages\plugins@nocobase\plugin-data-visualization\src\server\actions\query.ts
export const parseVariables = async (ctx: Context, next: Next) => {
const { mode, contextParams, ...values } = ctx.action.params.values as QueryParams;
if (mode !== 'sql') {
const resolvedValues = await resolveVariablesTemplate(ctx as any, values as any, contextParams || {});
ctx.action.params.values = {
...ctx.action.params.values,
...(resolvedValues as Record<string, any>),
};
}
const { filter } = ctx.action.params.values;
ctx.action.params.filter = filter;
+ // Temporarily set resourceName to the actual collection so that
+ // parseVariables/parseFilter can correctly resolve field types
+ // (e.g., dateOnly fields). Without this, getField looks up
+ // "charts.<field>" which doesn't exist, causing dateOnly fields
+ // to be treated as regular datetime fields with incorrect timezone handling.
+ const originalResourceName = ctx.action.resourceName;
+ const { collection: collectionName } = ctx.action.params.values as QueryParams;
+ ctx.action.resourceName = collectionName;
await middlewares.parseVariables(ctx, async () => {
+ ctx.action.resourceName = originalResourceName;
ctx.action.params.values.filter = ctx.action.params.filter;
await next();
});
};

