Default values of filters should support placeholders like "$current_user" #2835
Labels
Client: by X
Status: Community Help Wanted (good first issue)
simple tasks that don't require understanding every last detail of our platform
Type: Feature
new user-facing feature
As a admin I want to filter lists to match only records that link the current logged in user, to make the interface as simple as possible for users.
Entity lists can display filters above the table to let users narrow down the results. These are configured in the overall system config (Config:CONFIG_ENTITY doc in database / config-fix.ts demo config). We can already define a default value for a filter, to pre-select and pre-filter automatically (e.g.
filters: [{ "id": "authors", "default": "User:ff8b8bf8-ca1b-4ea4-82ff-4491d1c4ee06" }]
). This system should also suppport placeholders, like we use them for entity field defaultValue definitions.e.g. support a
FilterConfig
definition like this:(this should support all "dynamic" default values, i.e. also "$now")
Proposed Solutions & Alternatives
Reuse the implementation of the
DynamicPlaceholderValueService
and integrate this into theFilterGeneratorService
.Write unit tests first and develop this following the TDD approach.
The text was updated successfully, but these errors were encountered: