ViewsArgumentDefault CurrentUserUuid

Created on 6 November 2022, over 1 year ago
Updated 29 January 2024, 5 months ago

Problem/Motivation

If someone wants to filter entities based on UUID entity references on users with current user there is currently only the way on a relation and an user ID match. This brings two unneeded joins to the query.

Steps to reproduce

Create a entity reference UUID field with field API on an existing entity with user entity as target. Create some test entities connected to a user where you have access. At least try to create or modify a view with filter on current user. Without this plugin (see patch and merge request) there is only the workaround to configure a relation to referenced users and filter on this with current User ID. When "Show the SQL query" is activated in views config you can see the used table joins.

Proposed resolution

Provide an own ViewsArgumentDefault views plugin. (It's very simple. We already have one as proof of concept for a new contrib module but it makes more sense to integrate here.)

Remaining tasks

- Add views plugin. (C-Logemann)
- Review and discuss.

User interface changes

Add a new default argument on views config.

API changes

No.

Data model changes

No.

✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany C-Logemann Frankfurt/M, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024