Skip to content

Template tokens in filter values and notification templates are not evaluated at runtime #3582

Description

@yinlianghui

Observed on @objectstack/* 16.1.0 while building HotCRM (objectstack-ai/hotcrm). Several template-token forms that app metadata naturally reaches for are not evaluated at runtime, and each has produced silent wrong results:

  • Date/CEL tokens in filter values are not evaluated. View filters and dashboard widget filters like { field: 'close_date', operator: 'greater_than', value: '{current_year_start}' } (also {12_months_ago}, {30_days_ago}, {this_quarter_start}) pass validation but match nothing at runtime. Apps currently work around this by computing dates at module load (hotcrm src/reports/opportunity.report.ts:5-9, churn.report.ts:6-13), which freezes the dates into the built artifact.
  • {current_user} silently never matches; only {current_user_id} resolves in filters (hotcrm src/views/forecast.view.ts:66-67).
  • Flow notification templates cannot traverse lookups.to: ['{record.owner.manager}'] or body text {record.crm_account.name} interpolate the literal string "undefined" instead of failing validation or resolving (hotcrm src/flows/case-escalation.flow.ts:46-49).

In all three cases the metadata validates cleanly and the failure is only observable as empty widgets, unfiltered queries, or "undefined" in notification text.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions