Add the page layout filter table

Merged
EH
3d ago
+1941-2

Why

One dashboard date control can filter opportunities by close date and tasks by due date. The layout owns the control and its saved default. Each widget binding will choose the field that the control applies to.

Design

  • PageLayoutFilter is syncable metadata owned by a dashboard or standalone page layout. This first slice stores DATE filters with a null fieldMetadataId and validates saved defaults using the existing date filter rules, including IS_BETWEEN from #31817.
  • Deleting a layout cascades to its filters. A date filter survives field deletion because it belongs to the layout.
  • The flat layout cache stores filterIds, and the filter map stores the records. Layout deletion invalidates the filter map. Field deletion no longer needs the special layout and filter cache invalidation.

Testing

  • Passed 94 targeted unit tests.
  • Verified on disposable PostgreSQL that a date filter can be saved without a source field, survives field deletion, and is removed when its layout is deleted.

Stack

PRWhat it doesBase
#32005Store layout-owned date filtersmain
#32007Read and save filters through the layout API#32005
Follow-upBind filters to widget date fields#32007
Follow-upApply filters to widget queries and verify row-level permissionsWidget bindings
Follow-upAdd dashboard controls to create, link, and use filtersQuery execution
Follow-upCopy filters and remap bindings when duplicating a dashboardWidget bindings
Follow-upDefine and test filter reset for app-owned layoutsWidget bindings