Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default values of filters should support placeholders like "$current_user" #2835

Open
sleidig opened this issue Feb 4, 2025 · 0 comments
Open
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

Comments

@sleidig
Copy link
Member

sleidig commented Feb 4, 2025

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:

{
  "id": "authors",
  "default": "$current_user"
}

(this should support all "dynamic" default values, i.e. also "$now")

Proposed Solutions & Alternatives
Reuse the implementation of the DynamicPlaceholderValueService and integrate this into the FilterGeneratorService.
Write unit tests first and develop this following the TDD approach.

@sleidig sleidig added the Type: Feature new user-facing feature label Feb 4, 2025
@github-project-automation github-project-automation bot moved this to Triage / Analysis in All Tasks & Issues Feb 4, 2025
@sleidig sleidig added Status: Community Help Wanted (good first issue) simple tasks that don't require understanding every last detail of our platform Client: by X labels Feb 4, 2025
@sleidig sleidig moved this from Triage / Analysis to Todo (ready for work) in All Tasks & Issues Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Todo (ready for work)
Development

No branches or pull requests

1 participant